Simple solution [🇷 for BE/BA]

posted by yjlee168 Homepage – Kaohsiung, Taiwan, 2009-09-07 03:53 (5707 d 01:56 ago) – Posting: # 4154
Views: 13,212

(edited on 2009-09-07 13:06)

Dear ElMaestro,

Sorry about this delayed response (never got the chance to test your codes.) Yes, you're absolutely right about this. I've tested the previous codes that I got from one of R textbooks, and it did not work. As you suggested to simply use lm(lnAUC ~ Seq + Subj + Per + Trt) which was exactly equal to (have the same result) that obtained from lm(lnAUC ~ Seq + Subj:Seq + Per + Trt). Why we do use ":" in R? for nesting purpose, I suppose. Your following codes are quite interesting. It works, too, as the attached output. (I randomly tested with Cmax, not lnCmax.)

BearFit=lm(lnAuc~Seq+Subj+Per+Trt)    ## the standard and simple model

BearAnova=anova(BearFit)              ## BearAnova now holds the anova table

row.names(BearAnova)[2] = "Subj(Seq)" ## because it inherits from a data.frame


❝ BearFit=lm(lnAuc~Seq+Subj+Per+Trt) ## the standard and simple model

❝ BearAnova=anova(BearFit) ## BearAnova now holds the anova table

❝ row.names(BearAnova)[2] = "Subj(Seq)" ## because it inherits from a

❝ data.frame

Type I SS
Analysis of Variance Table

Response: Cmax
          Df Sum Sq Mean Sq F value Pr(>F)
seq        1   1057    1057  0.0247 0.8778
prd        1  37889   37889  0.8844 0.3656
drug       1  88706   88706  2.0705 0.1757
subj(seq) 12 719310   59943  1.3991 0.2849
Residuals 12 514123   42844               

Type III SS
Single term deletions

Model:
Cmax ~ seq + prd + drug + subj
          Df Sum of Sq     RSS     AIC F value  Pr(F)
<none>                  514123     307               
seq        0 2.328e-10  514123     307 (do we need this?)
prd        1     37889  552013     307  0.8844 0.3656
drug       1     88706  602830     309  2.0705 0.1757
subj(seq) 12    719310 1233434     307  1.3991 0.2849

Tests of Hypothesis for SUBJECT(SEQUENCE) as an error term

Error: subj
          Df Sum Sq Mean Sq F value Pr(>F)
prd:drug   1   1057    1057  0.0176 0.8966
Residuals 12 719310   59943               

    Error: Within Df Sum Sq Mean Sq F value Pr(>F) prd        1
    37889   37889  0.8844 0.3656 drug       1  88706   88706
    2.0705 0.1757 Residuals 12 514123   42844                             

The original outputs from bear are as follows.
Type I SS
Analysis of Variance Table

Response: Cmax
          Df Sum Sq Mean Sq F value Pr(>F)
seq        1   1057    1057  0.0247 0.8778
prd        1  37889   37889  0.8844 0.3656
drug       1  88706   88706  2.0705 0.1757
subj(seq) 12 719310   59943  1.3991 0.2849
Residuals 12 514123   42844               

Type III SS
Single term deletions

Model:
Cmax ~ seq + prd + drug + subj:seq
          Df Sum of Sq     RSS     AIC F value  Pr(F)
<none>                  514123     307               
prd        1     37889  552013     307  0.8844 0.3656
drug       1     88706  602830     309  2.0705 0.1757
subj(seq) 12    719310 1233434     307  1.3991 0.2849

Tests of Hypothesis for SUBJECT(SEQUENCE) as an error term

Error: subj
          Df Sum Sq Mean Sq F value Pr(>F)
prd:drug   1   1057    1057  0.0176 0.8966
Residuals 12 719310   59943               

Error: Within
          Df Sum Sq Mean Sq F value Pr(>F)
prd        1  37889   37889  0.8844 0.3656
drug       1  88706   88706  2.0705 0.1757
Residuals 12 514123   42844               

Many users ask us to provide the validation results obtained from bear with WinNonlin and SAS. In order to conveniently compare with, we may follow your suggested codes as above in the future.

All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here

Complete thread:

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

The difference between a surrogate and a true endpoint
is like the difference between a cheque and cash.
You can get the cheque earlier but then,
of course, it might bounce.    Stephen Senn

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