Dear all. I am trying to analyze my data with an anova, using aov, and the result looks like this> my_data<-read.csv(file.choose(),header=T,dec=".",sep=";") > attach(my_data) > names(my_data)[1] "Site" "Obstacle" "Treatment" "Dist_Obstacle" "Dist_start" "Transect" "Mainplot" "Obsplot" "Species1" "Species2" "Species3" [12] "Species4" "Species5" "Species6" "Species7" "Species8" "Species9" "Species10" "Species11" "Species12" "Species13" "Species14" [23] "Species15" "Species16" "Species_change" "channge_index" "Waterdata" "litter" "bare.soil"> aov_data<-aov(Species1~Site+Obstacle+Treatment+as.factor(Dist_Obstacle)+as.factor(Dist_start)+Transect+Mainplot+Obsplot) > aov_dataCall: aov(formula = Species1 ~ Site + Obstacle + Treatment + as.factor(Dist_Obstacle) + as.factor(Dist_start) + Transect + Mainplot + Obsplot) Terms: Site Obstacle Treatment as.factor(Dist_Obstacle) as.factor(Dist_start) Transect Obsplot Residuals Sum of Squares 2143.984 446.274 340.042 736.073 173.707 800.270 4014.378 17238.625 Deg. of Freedom 2 1 1 4 3 10 60 271 Residual standard error: 7.97566 27 out of 109 effects not estimable Estimated effects may be unbalanced My question is why do I get "effects not estimable", and "effects may be unbalanced). I have checked the data and it is balanced. I have attached the data to the question and would be greatly thankful for any help in understanding the output. Best regards, Petter ___________________________________ NOCC, http://nocc.sourceforge.net -- This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Rtext.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101130/78218075/attachment.txt>
On Nov 30, 2010, at 13:58 , Hedberg Peter wrote:>> aov_data > Call: > aov(formula = Species1 ~ Site + Obstacle + Treatment + as.factor(Dist_Obstacle) + > as.factor(Dist_start) + Transect + Mainplot + Obsplot) > > Terms: > Site Obstacle Treatment as.factor(Dist_Obstacle) as.factor(Dist_start) Transect Obsplot Residuals > Sum of Squares 2143.984 446.274 340.042 736.073 173.707 800.270 4014.378 17238.625 > Deg. of Freedom 2 1 1 4 3 10 60 271 > > Residual standard error: 7.97566 > 27 out of 109 effects not estimable > Estimated effects may be unbalanced > > > > My question is why do I get "effects not estimable", and "effects may be unbalanced). I have checked the data and it is balanced.Unfortunately, your attachment did not contain the data, but the sum of the Deg. of Freedom above is 352, suggesting that the observation count is 353, which is prime, so I find it difficult to believe that you have balanced data in the sense of a complete factorial design, even for a subset of your factors. A complete factorial with those DF would take more than 160000 observations! I suspect that aov() is simply the wrong tool for these data. lm() will do it, but watch out for the aliased effects. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
I realize the problem now, and you are right aov is wrong. It seams that it was completely wrong to use the transect in a fixed formula, since my Trasects are labeled A to P, and A to D is in one mainplot, E-H in another, I-L an a third, and M-P in a fourth. In this case lme, with random variables for Transect is better. Thank you for the help. Best regards, Petter Peter Dalgaard <pdalgd at gmail.com> skrev :> On Nov 30, 2010, at 13:58 , Hedberg Peter wrote: > > >> aov_data > > Call: > > aov(formula = Species1 ~ Site + Obstacle + Treatment + as.factor(Dist_Obstacle) + > > as.factor(Dist_start) + Transect + Mainplot + Obsplot) > > > > Terms: > > Site Obstacle Treatment as.factor(Dist_Obstacle) as.factor(Dist_start) Transect Obsplot Residuals > > Sum of Squares 2143.984 446.274 340.042 736.073 173.707 800.270 4014.378 17238.625 > > Deg. of Freedom 2 1 1 4 3 10 60 271 > > > > Residual standard error: 7.97566 > > 27 out of 109 effects not estimable > > Estimated effects may be unbalanced > > > > > > > > My question is why do I get "effects not estimable", and "effects may be unbalanced). I have checked the data and it is balanced. > > Unfortunately, your attachment did not contain the data, but the sum of the Deg. of Freedom above is 352, suggesting that the observation count is 353, which is prime, so I find it difficult to believe that you have balanced data in the sense of a complete factorial design, even for a subset of your factors. A complete factorial with those DF would take more than 160000 observations! > > I suspect that aov() is simply the wrong tool for these data. lm() will do it, but watch out for the aliased effects. > > -- > Peter Dalgaard > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com___________________________________ NOCC, http://nocc.sourceforge.net