EMA dataset 1 trouble [RSABE / ABEL]

posted by ElMaestro  – Denmark, 2013-04-08 22:23 (4418 d 23:42 ago) – Posting: # 10375
Views: 6,964

Hi all,

I am fiddling a bit around with scaled BE and trying to use R for same.
Cannot get to 107.11% - 124.89% for EMA dataset 1 / method A. My PE is correct so the trouble I guess is in somewhere in one of these parts:

1. sqrt(0.5*(1/nSeq1 + 1/nSeq2)
2. df and the critical T-value.

Ad 1:
Looks to me like the lm allows effect estimates for 75 subjects; this means subjects with a missing value are not tossed out. So I guess all is fine with 77 in total; seemingly 38 and 39. But I get the wrong CI anyway.

Ad 2:
For df I tried both the df form the full model and from the Ref-only model (let me add: I think it is a valid argument that the df from the latter should be used but I am sure we can have a good fight over that some other time).

Any ideas?
Here's some code bits:
A=read.table("EMAset1b.csv", header=T)
Model1=lm(log(A$DATA)~0+factor(A$FORMULATION)+
factor(A$PERIOD)+factor(A$SEQUENCE)+factor(A$SUBJECT))
lnPE=(coef(Model1)[2]-coef(Model1)[1]) ## works!
B=subset(A, FORMULATION=='R')
Model2=lm(log(B$DATA)~
factor(B$PERIOD)+factor(B$SEQUENCE)+factor(B$SUBJECT))
s=summary(Model2)$sigma ## works!
CV=sqrt(exp(s*s)-1.0) ## works!
DF=Model1$df.residual ## or use Model2's residual. Discuss some other time.
CritT=qt(1-0.05, DF)

(blah blah code for extraction of n per sequence)

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.


Thanks in advance.

Pass or fail!
ElMaestro

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,671 registered users;
122 visitors (0 registered, 122 guests [including 4 identified bots]).
Forum time: 22:05 CEST (Europe/Vienna)

Only dead fish go with the current.    Scuba divers' proverb

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