I am not sure if this is the rigth place to post this but i am working
in ecology and my project is ecological so here goes. Thanks in advance My problem is with a nested anova. I have read the r-help and it has answered some of my questions but i still need some help on this one. I have also posted for help on this data set before, so i apologize in advance for any repetition. My design is as follows: response: Quadrat Counts (individuals per quadrat) Explanatory: Region (3 regions) Locations (4 locations nested within each regionfor a total of 1 Site (4 sites nested within each location withineach region for a total of 48) I want to analyse this data set as an observational study where i am interested if 1) There is significant variation at each scale in thestudy 2) partition the variancecomponents for each scale. 3) Conduct multiplecomparisons at the highest level in the study (region) I have managed to accomplish my first two goals by analyzing the data as a 3 level nested Anova with the following code mod1 <- aov(Count~Region/Location/Site, data=data) This allows me to get the MS for a Anova table. However R does not compute the correct F-statistics (because it uses the residual MS for the denominator in all calculations which it shouldnt) so i manually computed the F-stats and variance components by hand. >From reading the help guide i learned about and tried using the Error(Region/Location/Site) command but then i can only get MS and no F-statistics and still hand to compute the rest by hand. My problem now is that i would liek to use TukeyHSD for multiple comparisons. Howeber since R is unable to compute the correct F statistics in this nested design i also think it is using the wrong MS and df in calculating tukeys q. for example when i use TukeyHSD(mod1, "Region") i will get values however i do not think they have been calculated correctly. Furthermore when i use the Error(Region/Location/Site) term i can then no longer use TukeyHSD as i get the error message that there is no applicable use of tukey on this object. i am just wondering if there is any way to use Multiple comparisons with R in a nested design like mine. I have thought about using lme or lmer but if i understand them right with a balanced design i should be able to get the same result using aov Thanksr _______________________________________________ R-sig-ecology mailing list [hidden email] https://stat.ethz.ch/mailman/listinfo/r-sig-ecology |
> I am not sure if this is the rigth place to post this but i am working
in ecology and my project is ecological so here goes. Thanks in advance > > My problem is with a nested anova. I have read the r-help and it has answered some of my questions but i still need some help on this one. I have also posted for help on this data set before, so i apologize in advance for any repetition. > > My design is as follows: > > response: Quadrat Counts (individuals per quadrat) > > Explanatory: > Region (3 regions) > Locations (4 locations nested within each regionfor a total of 1 Site (4 sites nested within each location withineach region for a total of > 48) > > > > I want to analyse this data set as an observational study where i am interested if > > 1) There is significant variation at each scale in thestudy > 2) partition the variancecomponents for each scale. > 3) Conduct multiplecomparisons at the highest level in the study (region) > > > > I have managed to accomplish my first two goals by analyzing the data as a 3 level nested Anova with the following code > > mod1 <- aov(Count~Region/Location/Site, data=data) You may want to consider a change in the general approach of your analysis. Your response variable is counts, so it would be more appropriate to take it as a Poisson random variable. So instead of a Gaussian linear model (the aov function) you could fit a generalized linear model. Furthermore, since you have a nested sampling design, you may need to treat the Location and Site factors as random factors (so you do not have to estimate 12+48 coefficients, or 12*48 coeff.) and focus on Region as a fixed effect. As recommended by Kingsford Jones, consider using the lmer function in the lme4 package. vignette("Implementation",package="lme4") vignette("Theory",package="lme4") HTH Rubén _______________________________________________ R-sig-ecology mailing list [hidden email] https://stat.ethz.ch/mailman/listinfo/r-sig-ecology |
Free forum by Nabble | Edit this page |