EMA dataset 1 - programmers trouble [RSABE / ABEL]

posted by d_labes  – Berlin, Germany, 2013-04-09 11:01 (4467 d 10:29 ago) – Posting: # 10379
Views: 6,101

Hi ElMaestro,

❝ Here's some code bits:

❝ A=read.table("EMAset1b.csv", header=T)

❝ ....

❝ lnU=lnPE+s*CritT*sqrt(0.5*(1/nBABA+1/nABAB)) ##can't get it right.

❝ lnL=lnPE-s*CritT*sqrt(0.5*(1/nBABA+1/nABAB)) ##can't get it right.


Try it with:
lnU=lnPE+s*CritT*sqrt(0.25*(1/nBABA+1/nABAB))
lnL=lnPE-s*CritT*sqrt(0.25*(1/nBABA+1/nABAB))


or even easier fit a model with intercept and get the confidence interval via call of confint(). No need to fiddle with n in sequences:
all <- lm(log(Data) ~ as.factor(formulation)+ as.factor(period) +as.factor(subject), data=A)
lnPE <- coef(all)[2]
CI   <- confint(all,level=0.9)[2,]


BTW: I have omitted sequence since it doesn't contribute to the mse to have such a term. Moreover I have all effects in lower letters (caps lock not arrested :-D).

My SAS gives (without back transformation):
                              Standard
  Parameter    Estimate          Error   t Value   Pr > |t|     90% Confidence Limits

  test-ref   0.14547372     0.04650869      3.13     0.0020     0.06864574   0.22230170


The latter R code gives:
> print(lnPE)
as.factor(tmt)T
      0.1454737
> print(CI)
       5 %       95 %
0.06864569 0.22230165

Regards,

Detlew

Complete thread:

UA Flag
Activity
 Admin contact
23,425 posts in 4,928 threads, 1,684 registered users;
26 visitors (0 registered, 26 guests [including 13 identified bots]).
Forum time: 21:30 CEST (Europe/Vienna)

No problem can stand the assault of sustained thinking.    Voltaire

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5