An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091127/f8ed4ff0/attachment-0001.pl>
using reshape to do ANOVA mixed models
2 messages · Or Duek, Peter Dalgaard
Or Duek wrote:
Hi, I just started with R and I found that there are many options to rearrange the data to do mixed models. I want to use the reshape function. I have 2 between subject variables and one within. I was able to change the data structure but still - the result of the aov functions are calculating everything as a within subject. the table looks like this: SerialNo breed treatment distance_1 distance_2 1 c57 dfp 235 3253 etc. I changed it to look like this: SerialNo breed treatment exposure distance 1 c57 dfp 1 235 1 c57 dfp 2 3253 etc. Then I do: dt<-aov(distance~(exposure*treatment*breed)+Error(SerialNo/exposure) + (treatment*breed), dataframe) what am I doing wrong?
For a start, not showing us the output.... Also not showing us enough of the data and not convincing us that you are actually using the reshaped data frame.
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907