[R] Post-hoc tests on Split-plot design

Richard M. Heiberger rmh at temple.edu
Tue May 12 20:02:56 CEST 2015


Yes, it is possible with the mmc function in the HH package.

install.packages("HH")  ## if you don't have it yet.
library(HH)
?MMC

Look at the maiz example, the long last example in ?MMC.

When you are ready for followup questions, reply to this message to
R-help (not directly to me and
not to nabble).  Please turn off the html mail option.  The html
version of R code is garbled
to illegibility on this plain text email list.

Please read the posting guide linked at the bottom of all R-help mail messages.
Please read also read
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Rich

On Tue, May 12, 2015 at 10:38 AM, Md Newaz <msnewaz at lakeheadu.ca> wrote:
> Dear R-help,
>
>
> can you please post the following message to the r-nabble forum.
>
>
> Thanks!
>
>
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Dear R users,
>
>
> I have been attempting to carry out post-hoc tests on a split-plot design:
>
>
> Model:
> Yijkl = µ + Ci + ω(i)j + δ(ij) + Tk + CTik + ωT(i)jk + Pl + CPil + ωP(i)jl
> + TPkl + CTPikl + ωTP(i)jkl + Ɛ(ijkl)
>
>
> I have successfully matched the appropriate degrees of freedom and mean
> squares presented in the table below using aov().
>
>
> *EMS Table:*
>
>
>
>
>
> 2
>
> 2
>
> 2
>
> 3
>
>
>
>
>
>
>
>
>
> F
>
> R
>
> F
>
> F
>
>
>
>
>
>
>
>
>
> i
>
> j
>
> k
>
> l
>
> EMS
>
> df
>
> F(1,2)
>
> Ci
>
> 0
>
> 2
>
> 2
>
> 3
>
> δ2 + 6δ2δ + 6δ2ω + 12Φ(C)
>
> 1
>
>
>
> ω(i)j
>
> 1
>
> 1
>
> 2
>
> 3
>
> δ2 + 6δ2δ + 6δ2ω
>
> 2
>
>
>
> δ(ij)
>
> 1
>
> 1
>
> 2
>
> 3
>
> δ2 + 6δ2δ
>
> 0
>
> F(1,2)
>
> Tk
>
> 2
>
> 2
>
> 0
>
> 3
>
> δ2 + 3δ2ωT + 12Φ(T)
>
> 1
>
> F(1,2)
>
> CTik
>
> 0
>
> 2
>
> 0
>
> 3
>
> δ2 + 3δ2ωT + 6Φ(CT)
>
> 1
>
>
>
> ωT(i)jk
>
> 1
>
> 1
>
> 0
>
> 3
>
> δ2 + 3δ2ωT
>
> 2
>
> F(2,4)
>
> Pl
>
> 2
>
> 2
>
> 2
>
> 0
>
> δ2 + 2δ2ωP + 8Φ(P)
>
> 2
>
> F(2,4)
>
> CPil
>
> 0
>
> 2
>
> 2
>
> 0
>
> δ2 + 2δ2ωP + 4Φ(CP)
>
> 2
>
>
>
> ωP(i)jl
>
> 1
>
> 1
>
> 2
>
> 0
>
> δ2 + 2δ2ωP
>
> 4
>
> F(2,4)
>
> TPkl
>
> 2
>
> 2
>
> 0
>
> 0
>
> δ2 + δ2ωTP + 4Φ(TP)
>
> 2
>
> F(2,4)
>
> CTPikl
>
> 0
>
> 2
>
> 0
>
> 0
>
> δ2 + δ2ωTP + 2Φ(CTP)
>
> 2
>
>
>
> ωTP(i)jkl
>
> 1
>
> 1
>
> 0
>
> 0
>
> δ2 + δ2ωTP
>
> 4
>
>
>
> Ɛ(ijkl)
>
> 1
>
> 1
>
> 1
>
> 1
>
> δ2
>
> 0
>
>
>
> Total
>
>
>
>
>
>
>
>
>
>
>
> 23
>
>
>
> mod <- aov(Budburst ~ CO2*SoilTemp*Photoperiod +
> Error(Greenhouse/(SoilTemp*Photoperiod)), data = data)
>
> summary(mod)
>
>
>
> Error: Greenhouse
>
>                   Df    Sum Sq   Mean Sq   F value   Pr(>F)
>
> CO2           1       1465.2    1465.2      38.81      0.0248
>
> Residuals    2       75.5         37.8
>
>
>
> Error: Greenhouse:SoilTemp
>
>                            Df    Sum Sq   Mean Sq   F value   Pr(>F)
>
> SoilTemp             1     238.00    238.00       80.57    0.0122
>
> CO2:SoilTemp      1     145.70    145.70       49.32    0.0197
>
> Residuals              2     5.91        2.95
>
> Error: Greenhouse:Photoperiod
>
>                                 Df    Sum Sq  Mean Sq   F value  Pr(>F)
>
> Photoperiod               2    986.9      493.4        6.965     0.0498
>
> CO2:Photoperiod        2    0.2         0.1            0.001     0.9989
>
> Residuals                   4    283.4      70.8
>
>
>
> Error: Greenhouse:SoilTemp:Photoperiod
>
>                                                    Df   Sum Sq   Mean Sq
>   F value   Pr(>F)
>
> SoilTemp:Photoperiod                   2    14.56       7.28
>         0.514     0.6330
>
> CO2:SoilTemp:Photoperiod            2    186.31     93.15         6.576
>     0.0544
>
> Residuals                                      4    56.67
>       14.17
>
>
>
> Error: Within
>
>                     Df     Sum Sq   Mean Sq F value Pr(>F)
>
> Residuals      216   2887        13.37
>
>
>
> However, as neither TukeyHSD() nor glht() accept objects of class
> “aovlist”, I cannot carry out the post-hoc tests. Is there any way to run a
> post-hoc test on an object of class "aovlist"?
>
>
>
> Alternatively, I tried modelling the data using lme() and lmer(), but the
> problem is that I cannot match the appropriate degrees of freedom and mean
> squares obtained from the above included expected mean squares table using
> lme() or lmer().
>
>
>
> Has anyone else encountered and overcome this issue?
>
>
>
> Thanks in advance,
>
>
> Md. Shah Newaz
>
> Faculty of Natural Resources Management
>
> Lakehead University
>
> Thunder Bay, Ontario, Canada
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list