No ANOVA by lme() – lengthy reply [🇷 for BE/BA]

posted by Weidson – Brazil, 2022-01-02 15:51 (816 d 11:02 ago) – Posting: # 22726
Views: 2,418

Helmut,

Thank you very much for answer!!! It was very complete!!!:clap:

please, look the ANOVA table results that was generate by proposed code (no changes were made with the sequence effect):

❝ attr(TypeIII, "heading")[1] <- "Type III Analysis of Variance Table\n"

❝ MSdenom <- TypeIII["sequence:subject", "Mean Sq"]


❝ df2 <- TypeIII["sequence:subject", "Df"]


❝ fvalue <- TypeIII["sequence", "Mean Sq"] / MSdenom

❝ df1 <- TypeIII["sequence", "Df"]


❝ TypeIII["sequence", 4] <- fvalue

❝ TypeIII["sequence", 5] <- pf(fvalue, df1, df2, lower.tail = FALSE)

❝ print(TypeIII, digits = 6, signif.stars = FALSE)


Analysis of Variance Table


❝ Response: log(PK)

❝                   Df   Sum Sq Mean Sq F value   Pr(>F)

❝ Sequence           1   1.3253 1.32531 2.44067 0.120391

❝ Period             3   3.5824 1.19413 2.19909 0.090673

❝ Treatment          1   2.7923 2.79228 5.14222 0.024818

❝ Sequence:Subject  48 233.6721 4.86817 8.96514  < 2e-16

❝ Residuals        146  79.2796 0.54301



So I made a small modification in your code:

Fit_1 <- lm(log(Cmax) ~ Sequence + Subject%in%Sequence + Period + Treatment , data=Cmax)
Type_I<-anova(Fit_1)
Type_III       <- Type_I # use what we have
attr(Type_III, "heading")[1] <- "Type III Analysis of Variance Table\n"
MSdenom       <- Type_III[4, "Mean Sq"]
df2           <- Type_III[4, "Df"]
fvalue        <- Type_III[1, "Mean Sq"] / MSdenom
df1           <- Type_III[1, "Df"]
Type_III["Sequence", 4] <- fvalue
Type_III["Sequence", 5] <- pf(fvalue, df1, df2, lower.tail = FALSE)
print(Type_III, digits = 6, signif.stars = TRUE)



And here, the new results

#########################################################################
Type III Analysis of Variance Table

Response: log(Cmax)
                  Df   Sum Sq Mean Sq F value   Pr(>F)   
Sequence           1   1.3253 1.32531 0.27224 0.604233   
Period             3   3.5824 1.19413 2.19909 0.090673 . 
Treatment          1   2.7923 2.79228 5.14222 0.024818 * 
Sequence:Subject  48 233.6721 4.86817 8.96514  < 2e-16 ***
Residuals        146  79.2796 0.54301                     
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


One last doubt: How can we include at function lme() a term for carryover first-order effect (keeping the sequence effect in the model)? We have many DF for estimate this effect, so I presume that it can be estimated to replicate designs as this our example!!! How and how many columns should we have in the dataset to estimate the first-order carryover effect?

This test can be useful when we are working with auto-inducers drugs (I read your article and I like very much).


At Phoenix WinNonlin this can be make creating two collumns named "Carry" and "Over". The collumn "Carry" is composed by 0 (if data of period 1) or 1 (if data period 2,3,4 ...). You should define "Carry" as covariate and "Over" as Classification. The collumn "Over" indicates which treatment was administered in the previous period. The fixed model: Sequence+Treatment+Period+Carry*over. The specification for random effects that I use is the same oriented by FDA for replicate design (Repeted specification=Period, Variance Bloking Variable=Subject, Group=Treatment (Type=Variance components), Random effects model=Treatment, Variance blocking Variables=Subject (Type=Banded No-Diagonal Factor Analytic f=2):ok:

How would be this parametrization at function lme at R software?:confused:

Complete thread:

UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,636 registered users;
67 visitors (0 registered, 67 guests [including 4 identified bots]).
Forum time: 02:54 CET (Europe/Vienna)

With four parameters I can fit an elephant,
and with five I can make him wiggle his trunk.    John von Neumann

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