Simple solution [🇷 for BE/BA]
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.)
The original outputs from bear are as follows.
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.
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
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:
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-26 20:54 [🇷 for BE/BA]
- Let's skip the fancy nesting syntax! yjlee168 2009-08-26 22:29
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-26 22:46
- Let's skip the fancy nesting syntax! yjlee168 2009-08-27 20:54
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-27 22:14
- Let's skip the fancy nesting syntax! yjlee168 2009-08-27 20:54
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-26 22:46
- Let's skip the fancy nesting syntax! yjlee168 2009-08-27 22:26
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-27 22:46
- Simple solution ElMaestro 2009-08-27 23:53
- Simple solutionyjlee168 2009-09-07 01:53
- Type III SS again ElMaestro 2009-09-07 15:47
- Type III SS again yjlee168 2009-09-07 18:08
- Type III SS again ElMaestro 2009-09-07 19:53
- Type III SS again yjlee168 2009-09-07 18:08
- Type III SS again ElMaestro 2009-09-07 15:47
- Simple solutionyjlee168 2009-09-07 01:53
- Let's skip the fancy nesting syntax! yjlee168 2009-08-26 22:29