Hello R gurus,
I am a beginner with R. I am doing an ANCOVA analysis using 'aov,' and need
some help understanding how 'aov' works. I have a dataset (taken from
http://faculty.vassar.edu/lowry/ch17pt2.html) looking at hypnotic induction.
The variable 'X' is a measure of how susceptible the subject is to being
hypnotized, the variable 'Y' is how well the subject was hypnotized in the
experiment, and the variable 'Method' is the method of hypnosis used in the
experiment.
If I use the following code, I get the correct analysis (F = 16):
ANCOVA=aov(lm(Y~X+Method,data=hypnotic.induction))
summary(ANCOVA);
But if I switch the order of independent variables to:
ANCOVA=aov(lm(Y~Method+X,data=hypnotic.induction))
summary(ANCOVA)
I get a very different result (F = 0.8).
I assume it has something to do with the order in which the variables are
entered into the regression? In 'aov' is there something 'special' about the
first independent variable entered into the formula? It would be greatly
appreciated if anyone could shed some light on these results?
Thanks!
Alex Keedy
---------------------------------
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.