EMA dataset 1 - programmers trouble [RSABE / ABEL]

posted by d_labes  – Berlin, Germany, 2013-04-09 11:01 (4418 d 19:10 ago) – Posting: # 10379
Views: 5,928

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,424 posts in 4,927 threads, 1,671 registered users;
148 visitors (0 registered, 148 guests [including 8 identified bots]).
Forum time: 06:11 CEST (Europe/Vienna)

Don’t undertake a project
unless it’s manifestly important
and nearly impossible.    Edwin H. Land

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