Hello R Community! I am an intermediate-level R user and I am trying to figure out how program a two-way (Group and MCCB score) ANCOVA analysis and subsequent post-hoc analysis. My factors: Group (2 levels) Score (2 levels) Covariates: Age (continuous) ICV (continuous) Sex (M/F) Y: GMV(continuous)
I am interested in looking at the interaction of these two factors and have set up my ANCOVA as follows: *model1 <-aov(GMV~ GROUP*Score +Age +ICV +Sex, data=dataframe)* *summary(model1) * which has given me some very exciting results... Analysis of Variance Table Response: GMV Df Sum Sq Mean Sq F value Pr(>F) GROUP 1 104219614 104219614 25.119 1.739e-06 *** Score 1 231825545 231825545 55.875 1.042e-11 *** Sex 1 49112001 49112001 11.837 0.0007828 *** Age 1 165812317 165812317 39.964 3.882e-09 *** ICV 1 283849872 283849872 68.414 1.416e-13 *** GROUP:Score 1 30802470 30802470 7.424 0.0073292 ** Residuals 129 535224714 4149029 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 I need to control for multiple comparisons as I will be trying other variables in place of GMV. From the forum, TukeyHSD() will not work as I have covariates. The glth() shows promise, however, I am not sure if the resulting statistics are what I am looking for? *mc1<-mcalinfct(model1, "GROUP")* *summary(glht(model1, linfct=mc1))* Simultaneous Tests for General Linear Hypotheses Fit: aov(formula = GMV ~ GROUP * Score + Age + ICV +Sex, data =dataframe) Linear Hypotheses: Estimate Std. Error t value Pr(>|t|) 1 == 0 -844.9 392.2 -2.154 0.0331 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Adjusted p values reported -- single-step method) I believe this means that the difference in GMVs is statistical significant between my groups (pcor = 0.03). Does this also mean that my interaction is significant? If not, how do I test for that? My intention is to be able to create a graphic of this interaction similar to the attached. I tried using previous posts from the help forum. I believe this post holds the answer, but it is beyond my R programming ability. If someone could help explain... http://r.789695.n4.nabble.com/Multiple-comparisons-for-a-two-factor-ANCOVA-td1593039.html http://cran.r-project.org/web/packages/HH/HH.pdf Thanks! Lindsay -- Lindsay Hanford, BSc, PhD Candidate McMaster Integrative Neuroscience Discovery & Study | *Department of Psychology, Neuroscience & Behaviour * McMaster University *|* 1280 Main Street West, PC329 Psychology Building *|* Hamilton, ON, L8S 4L8 905 525 9140 x24784 *|* lindsay.hanf...@gmail.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.