[R] an(other) anova question
Remy X.O. Martin
vsxo at hotmail.com
Tue Jul 13 12:52:18 CEST 2004
[sorry if this arrives in duplo: it doesn't show up in the archives and it seems that the address I posted this from originally is no longer functional]
Hello,
I think I could do with some suggestions concerning the following problem.
I have data from a set of experiments on motion sickness where for each subject, I have
1) personal data like age and gender
2) a subjective rating of discomfort/sickness, on a 10-level scale, "sampled" by the subjects as changes occurred. This rating is normalised per subject to the individual maxima given: Sickness.norm .
3) a conclusive, objective rating sick/not-sick. (WasSick)
4) various objective observables, sampled throughout the experiment. These are averaged either per time-interval (of say 2") or per "plateau" of the subjective discomfort rating.
I intend to analyse the averaged observables from (4) (say mean and power/variance) as a function of the (2), (3) and (1). It would be interesting, at least for first looks, to be able to do something like
> summary( aov( mean~Sickness.norm*Gender + Error(Subject/(Sickness.norm*Gender) ) )
or
> summary( aov( mean~Sickness.norm*WasSick + Error(Subject/(Sickness.norm*WasSick) ) )
To stick with the latter example: my data is sufficiently balanced (about 50% sick subjects), so I would expect that there are sufficient samples to perform an ANOVA with. I get the message
"Error in "names<-.default"(`*tmp*`, value = nmstrata) :
names attribute must be the same length as the vector"
I expect that this has to do with the fact that none of my independent variables are in fact truely independent (controlled by the experimenter), but instead depend on the subject. For the age, gender and 'WasSick' data, there is only a single number per subject (indeed, removing them from the anova makes the analysis "possible").
So I reckon that they must enter elsewhere in the Error() expression...
I'd appreciate it if somebody is capable and willing to explain if and how this can be done!
Thanks in advance!
R.
More information about the R-help
mailing list