[R] ANCOVA post-hoc test
peter dalgaard
pdalgd at gmail.com
Sun Feb 12 19:28:03 CET 2012
Inline below
On Feb 12, 2012, at 13:39 , Evagelopoulos Thanasis wrote:
[...]
>
> Because there exist significantly different regression slopes, I did a post hoc test with glht() to find out between which samplings:
>
>> summary(glht(mod, linfct=mcp(sampling="Tukey")))
>
I believe this compares the intercepts, not slopes. Slope differences are in the sampling:dist interaction terms.
> The results seem to say that there are no significantly different slopes for any of the pair-wise comparisons of factor levels:
>
> Simultaneous Tests for General Linear Hypotheses
>
> Multiple Comparisons of Means: Tukey Contrasts
>
>
> Fit: aov(formula = h ~ sampling * dist, data = data)
>
> Linear Hypotheses:
> Estimate Std. Error z value Pr(>|z|)
> sp - au == 0 0.06696 0.04562 1.468 0.457
> su - au == 0 -0.02238 0.04562 -0.491 0.961
> wi - au == 0 0.01203 0.04562 0.264 0.994
> su - sp == 0 -0.08934 0.04562 -1.958 0.204
> wi - sp == 0 -0.05493 0.04562 -1.204 0.624
> wi - su == 0 0.03441 0.04562 0.754 0.875
> (Adjusted p values reported -- single-step method)
>
We don't have coefficients for your model, so it is a bit hard to tell what the parameter functions are, but I would expect those NOT to be the slope differences.
> Warning message:
> In mcp2matrix(model, linfct = linfct) :
> covariate interactions found -- default contrast might be inappropriate
>
>
>
> My questions are:
>
> - Did I make a mistake somewhere? (I probably did!)
You need to figure out how to get glht to look at the appropriate linear hypothesis (and mcp(sampling=...) is not right). I'd do a straight lm() analysis so that I'd know exactly what the parameters mean -- aov() can be a little too good at hiding technical details from the user!
> - Could I do pairwise ANCOVAs and thus have just two factor levels (=two regression slopes) to compare each time?
Possibly, but you'd lose the multiple comparison features of glht.
> What does the warning message "covariate interactions found -- default contrast might be inappropriate" mean?
>
That you likely don't want to look at intercepts (or whatever the "sampling" parameters represent --- I'm not familiar with that ancova() function) in the presence of interactions...
> Thank you!
> Athanasios Evagelopoulos
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list