I'm working on lung
dataset of ISwR
package in R.
A book by Peter Dalgaard, "Introductory Statistics with R" has assigned me to answer this question: 7.2 In the lung data, do the three measurement methods give systematically different results? If so, which ones appear to be different?
In this data, volume is a numeric vector and there are two factor variables: method(A, B, C) and subject(1, 2, 3, 4, 5, 6).
So What I did was simply,
anova(lm(volume ~ method, data=lung))
Its result was just an insignificant one.
I found out in the answer section of the book that I also have to put in 'subject', as in
anova(lm(volume ~ method + subject, data=lung))
And it gave me the right answer, showing significance for both method and subject.
But I cannot understand the result; Why is it insignificant with the one-way anova? And why did it become significant with one more variable added?
To faithfully answer the question, don't I have to input only method
?