[R] Error term in aov syntax question
Petr Pikal
petr.pikal at precheza.cz
Thu Oct 18 17:21:22 CEST 2001
Hallo all
I went through all files and through some books I have, but still I am not
completely sure about the correct aov syntax.
Suppose I have a dataset divided to three portions, according to a factor "mereni"
which is a measurement day. There is another factor named "frakce" (Each
sample is divided into three distinct fractions according to its particle size).
samp frakce h mereni
62 0 21.35 1
66 0 21.41 1
70 0 21.42 1
66 0.25 20.93 1
62 1 20.91 1
66 1 21.29 1
70 1 21.22 1
26 0 20.79 2
34 0 20.20 2
26 0.25 20.30 2
37 0.25 20.07 2
71 0.25 21.20 2
26 1 20.73 2
34 1 20.20 2
39 1 19.87 2
49 0 20.01 3
49 0.25 20.05 3
59 0.25 19.78 3
49 1 20.01 3
54 1 20.45 3
The samples are actually taken from one process and the hypotheses to be tested
are:
**Are all samples same?
It seems that within each measurement they are all the same but:
> summary(aov(h[mereni==3]~vzor[mereni==3]))
Df Sum Sq Mean Sq F value Pr(>F)
vzor[mereni == 3] 2 0.234296 0.117148 224.58 0.004433 **
Residuals 2 0.001043 0.000522
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
**Does a measurement day influence the response ("ce","h"),?
It seems that yes.
> summary(aov(h~mereni))
Df Sum Sq Mean Sq F value Pr(>F)
mereni 2 4.3911 2.1956 19.625 3.826e-05 ***
Residuals 17 1.9019 0.1119
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
**Are there some differences in response among fractions?
It seems that yes but only for measurement 1.
> summary(aov(h[mereni==1]~frakce[mereni==1]))
Df Sum Sq Mean Sq F value Pr(>F)
frakce[mereni == 1] 2 0.193038 0.096519 4.5464 0.09334 .
Residuals 4 0.084918 0.021230
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
I know there are not many measurements (only one 0.25 fraction in measurement
1 and one 0 fraction in measurement 3) in my dataset :-(.
But if I had more data in one measurement (let say three fractions in each of three
samples),
is the correct aov syntax for such problem like this:
summary(aov(h~frakce+vzor+Error(mereni/(frakce+vzor))))
Thanks a lot
Petr Pikal
Precheza a.s.
Nabø.Dr.E.Beneše 24
750 62 Pøerov
+420641 25 2257
0724 008 364
petr.pikal at precheza.cz
p.pik at volny.cz
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list