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

2015-05-13 Thread Shah
Hi Richard,
Thank you very much for your cooperation. I installed the packages HH and
run the following model: 

Bud.aov-aov(terms(Budburst~CO2*SoilTemp*Photoperiod+Greenhouse/(SoilTemp*Photoperiod),keep.order=TRUE),data=data)
 summary(Bud.aov)
  Df   Sum Sq   Mean SqF
valuePr(F)   

CO211465.21465.2  
109.6122e-16 ***

SoilTemp 1238.0  238.0
17.805  3.60e-05 ***

CO2:SoilTemp  1145.7  145.7 
10.900 0.001125 **

Photoperiod  2986.9  493.4 
36.914 1.62e-14 ***

CO2:Photoperiod   2 0.2  0.1   
0.0060.994095   

SoilTemp:Photoperiod2 14.67.3   
0.5450.580893   

CO2:SoilTemp:Photoperiod 2186.3  93.2   6.969   
0.001167 **

Greenhouse   275.537.8  
2.8240.061538 . 

SoilTemp:Greenhouse 2 5.9  3.0  
0.2210.801896   

Photoperiod:Greenhouse  4283.4  70.8   5.300
  
0.000433 ***

SoilTemp:Photoperiod:Greenhouse   456.714.2  1.060   
0.377363   

Residuals   216 2887.313.4



The results don't look like the results for the split-plot design which I
got using the model below: 

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)  

CO21 1465.2  1465.2  38.810.0248 *

Residuals  2   75.537.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.912.95 

Error: Greenhouse:Photoperiod

  Df Sum Sq Mean Sq F value Pr(F)  

Photoperiod 2  986.9   493.46.9650.0498 *

CO2:Photoperiod  20.2 0.1  0.001 0.9989  

Residuals4  283.470.8 

Error: Greenhouse:SoilTemp:Photoperiod

Df Sum Sq Mean Sq F value Pr(F)  

SoilTemp:Photoperiod 2  14.567.280.5140.6330  

CO2:SoilTemp:Photoperiod  2 186.31   93.15  6.5760.0544 .

Residuals   4  56.67   14.17 

Error: Within

Df   Sum Sq Mean Sq F value Pr(F)

Residuals 216   2887 13.37   


The F and P values are quite different. Moreover, I could not run the
post-hoc tests as well. At this stage I shall highly appreciate your further
assistance.

Thanks.

Shah 



--
View this message in context: 
http://r.789695.n4.nabble.com/Post-hoc-tests-on-Split-plot-design-tp4707106p4707165.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


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

2015-05-12 Thread Richard M. Heiberger
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 msne...@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

   DfSum Sq   Mean Sq   F value   Pr(F)

 CO2   1   1465.21465.2  38.81  0.0248

 Residuals2   75.5 37.8



 Error: Greenhouse:SoilTemp

DfSum Sq   Mean Sq   F value   Pr(F)

 SoilTemp 1 238.00238.00   80.570.0122

 CO2:SoilTemp  1 145.70145.70   49.320.0197

 Residuals  2 5.912.95

 Error: Greenhouse:Photoperiod

 DfSum Sq  Mean Sq   F value  Pr(F)

 Photoperiod   2986.9  493.46.965 0.0498

 CO2:Photoperiod20.2 0.10.001 0.9989

 Residuals   4283.4  70.8



 Error: Greenhouse:SoilTemp:Photoperiod

Df   Sum Sq   Mean Sq
   F value   Pr(F)

 SoilTemp:Photoperiod   214.56   7.28
 0.514 0.6330

 CO2:SoilTemp:Photoperiod2186.31 93.15 6.576
 0.0544

 Residuals  456.67
   14.17



 Error: Within

 Df Sum Sq   Mean Sq F value Pr(F)

 Residuals  216   288713.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@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.

__
R-help@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.