Rev 3734 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
S> ### $Id: CultMiss.St,v 1.1 1999/10/13 00:50:09 saikat Exp $S> ### A blocked split-plot with missing data (sec 2.7, pp. 68-75)S> ## Remove all observations in block 1, cultivar 'A'.S> options( contrasts = c(factor = "contr.SAS", ordered = "contr.poly") )S> CultMiss <- Cultivation[ Cultivation$Block != 1 | Cultivation$Cult != 'a', ]S> dim(CultMiss)[1] 21 4S> plot( CultMiss, inner = ~ Inoc )S> fm1CultM <- lme( drywt ~ Cult * Inoc, CultMiss, list(Block = ~ 1, Cult = ~ 1),+ method = "ML")S> summary( fm1CultM )Linear mixed-effects model fit by maximum likelihoodData: CultMissAIC BIC logLik76.647 86.047 -29.323Random effects:Formula: ~ 1 | Block(Intercept)StdDev: 0.86256Formula: ~ 1 | Cult %in% Block(Intercept) ResidualStdDev: 0.86879 0.66455Fixed effects: drywt ~ Cult * InocValue Std.Error DF t-value p-value(Intercept) 33.525 0.8241 10 40.680 <.0001Cult -0.619 1.0123 2 -0.612 0.6031Inoccon -5.500 0.5560 10 -9.892 <.0001Inocdea -2.875 0.5560 10 -5.171 0.0004CultInoccon 0.867 0.8493 10 1.020 0.3316CultInocdea -0.725 0.8493 10 -0.854 0.4133Correlation:(Intr) Cult Inoccn Inocde CltInccCult -0.502Inoccon -0.337 0.275Inocdea -0.337 0.275 0.500CultInoccon 0.221 -0.420 -0.655 -0.327CultInocdea 0.221 -0.420 -0.327 -0.655 0.500Standardized Within-Group Residuals:Min Q1 Med Q3 Max-1.4566 -0.55593 0.19646 0.37888 1.9535Number of Observations: 21Number of Groups:Block Cult %in% Block4 7S> fm2CultM <- update( fm1CultM, drywt ~ Cult + Inoc )S> fm3CultM <- update( fm1CultM, drywt ~ Inoc )S> fm4CultM <- update( fm1CultM, drywt ~ 1 )S> anova( fm1Cult, fm2Cult, fm3Cult, fm4Cult )Model df AIC BIC logLik Test L.Ratio p-valuefm1Cult 1 9 86.76 97.36 -34.378fm2Cult 2 7 85.88 94.13 -35.940 1 vs 2 3.125 0.2096fm3Cult 3 6 84.79 91.85 -36.393 2 vs 3 0.905 0.3415fm4Cult 4 4 122.48 127.19 -57.238 3 vs 4 41.691 <.0001S> # Essentially the same conclusions as for the balanced dataS> fm3RCultM <- update( fm3CultM, method = "REML" )S> summary( fm3RCultM )Linear mixed-effects model fit by REMLData: CultMissAIC BIC logLik74.474 79.816 -31.237Random effects:Formula: ~ 1 | Block(Intercept)StdDev: 1.1726Formula: ~ 1 | Cult %in% Block(Intercept) ResidualStdDev: 0.83473 0.83465Fixed effects: drywt ~ InocValue Std.Error DF t-value p-value(Intercept) 33.305 0.74204 12 44.883 <.0001Inoccon -5.129 0.44614 12 -11.495 <.0001Inocdea -3.186 0.44614 12 -7.141 <.0001Correlation:(Intr) InoccnInoccon -0.301Inocdea -0.301 0.500Standardized Within-Group Residuals:Min Q1 Med Q3 Max-1.7182 -0.2666 -0.14867 0.36054 1.7434Number of Observations: 21Number of Groups:Block Cult %in% Block4 7