[R] ANCOVA in R, single CoVar, two Variables
tom.wardley at exosect.com
Wed May 12 10:24:59 CEST 2010
Thankyou all for the replies!
I am sure you can guess the next question that is coming...
I expanded the code (and the data set) to now include a third type "C",
which I made VERY similar to A:
anco <- read.table(tmp, header=TRUE)
wind <- data.frame(day=rep(anco$day, 3),
y=c(anco$A, anco$B, anco$C),
ancova(y ~ day + type, data=wind)
But of course then the type summary only shows significance for all three
(or four or five if I add them, which I will have to do for my application)
as you can see in the output.
Df Sum Sq Mean Sq F value Pr(>F)
day 1 165.888 165.888 661.0229 <2e-16 ***
type 2 0.140 0.070 0.2789 0.7591
Residuals 23 5.772 0.251
Now I know that when you do just an ANOVA you get this kind of result, which
then leads you on to post hoccing the data (is it spelt hoccing or hocing?).
Is that the way to go or is a slight modification of the code the way to go?
I am very new to R and not that good at Stats and I am not sure exactly how
to approach this problem now (they didnt even teach us ANCOVAs at
university, either that or I slept through that lecture).
Thanks again for all the great help!
View this message in context: http://r.789695.n4.nabble.com/ANCOVA-in-R-single-CoVar-two-Variables-tp2173850p2195734.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help