Re: [R] Nested ANOVA yields surprising results

2015-10-31 Thread peter dalgaard
> On 30 Oct 2015, at 18:46 , Daniel Wagenaar wrote: > > Dear R users: > > All textbook references that I consult say that in a nested ANOVA (e.g., > A/B), the F statistic for factor A should be calculated as > > F_A = MS_A / MS_(B within A). > That would depend on which hypothesis you test

[R] Nested ANOVA yields surprising results

2015-10-30 Thread Daniel Wagenaar
Dear R users: All textbook references that I consult say that in a nested ANOVA (e.g., A/B), the F statistic for factor A should be calculated as F_A = MS_A / MS_(B within A). But when I run this simple example: set.seed(1) A <- factor(rep(1:3, each=4)) B <- factor(rep(1:2, 3, each=2)) Y <-

[R] Nested ANOVA

2012-12-20 Thread Annette van Baalen
Hi all, I'm trying to perform a nested ANOVA, in which "Rewetted" is the main factor and "Position" is a fixed factor nested in "Location". I'm interested in the effect of "Rewetting" and "Position" on the dependent variable (in this case called N), and also in the interaction between these factor

[R] Nested ANOVA

2012-08-06 Thread Archana Gawde
Hi, How do I do a Duncan Multiple Range Test, with Nested ANOVA. I am not sure how to write the nested variable within dmrt. Any suggestions? Archana [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz

Re: [R] nested anova<-R chrashing

2011-09-12 Thread Ben Bolker
joerg stephan rhrk.uni-kl.de> writes: > > Hi, > > I tried to do a nested Anova with the attached Data. My response > variable is "survivors" and I would like to know the effect of > (insect-egg clutch) "size", "position" (of clutch on twig) and "clone" > (/plant genotype) on the survival of

[R] nested anova<-R chrashing

2011-09-12 Thread joerg stephan
Hi, I tried to do a nested Anova with the attached Data. My response variable is "survivors" and I would like to know the effect of (insect-egg clutch) "size", "position" (of clutch on twig) and "clone" (/plant genotype) on the survival of eggs (due to predation). Each plant was provided with

Re: [R] nested anova

2010-10-22 Thread Dennis Murphy
Hi: On Thu, Oct 21, 2010 at 4:13 PM, mirick wrote: > > Hello all, > Can any of you R gurus help me out? I’m not all that great at stats to > begin with, and I’m also learning the R ropes (former SAS user). > Sounds like you need a support group :) > Here’s what I need help with… I have a ne

Re: [R] nested anova

2010-10-22 Thread Joshua Wiley
Hi Rick, Whenever I hear my instant association with post hoc and ANOVA would be ?TukeyHSD However, if you are not comfortable interpreting the model you ran, this suggests that you may benefit more from learning more statistical theory or finding someone to consult with who can help. You might

[R] nested anova

2010-10-22 Thread mirick
Hello all, Can any of you R gurus help me out? I’m not all that great at stats to begin with, and I’m also learning the R ropes (former SAS user). Here’s what I need help with… I have a nested sample design and ran a nested anova, but I don’t know how to interpret the results habitat (four dif

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-06 Thread John Fox
milton, Ontario, Canada web: socserv.mcmaster.ca/jfox > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Anita Narwani > Sent: June-03-10 8:49 PM > To: Joris Meys > Cc: r-help@r-project.org > Subject: Re: [R]

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
Yes I understood the strangeness of removing a main effect without interactions that contain it because I did this during my efforts using model simplification. I had checked out the link you sent a couple of days ago. It was useful. So does Type II SS remove both the factor and any interactions co

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Joris Meys
SPSS uses a different calculation. As far as I understood, they test main effects without the covariate. Regarding the difference between my and your results, did you use sum contrasts? options(contrasts=c("contr.sum","contr.poly")) On Fri, Jun 4, 2010 at 2:19 AM, Anita Narwani wrote: > Hi Joris,

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
Hi Joris, That seems to have worked and the contrasts look correct. I have tried comparing the results to what SPSS produces for the same model. The two programs produce very different results, although the model F statistics, R squared and adjusted R squared values are identical. The results are s

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Joris Meys
Hi Anita, I have to correct myself too, I've been rambling a bit. Off course you don't delete the variable out of the interaction term when you test the main effect. What I said earlier didn't really make any sense. That testing a main effect without removing the interaction term is has a tricky

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Joris Meys
I see where my confusion comes from. I counted 4 levels of Phyto, but you have 8, being 4 in every level of Diversity. There's your aliasing. > table(Diversity,Phyto) Phyto Diversity M1 M2 M3 M4 P1 P2 P3 P4     H  0  0  0  0  6  6  6  6     L  6  6  6  6  0  0  0  0 There's no ne

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Joris Meys
Could you copy the data? Data <- data.frame(C.Mean,Mean.richness,Zoop,Diversity,Phyto) dput(Data) I have the feeling something's wrong there. I believe you have 48 observations (47df + 1 for the intercept), 2 levels of Diversity, 4 of Phyto and 48/(3*4)=4 levels of Zoop. But you don't have 3df fo

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
I would just like to add that when I remove the co-variate of Mean.richness from the model (i.e. eliminating the non-orthogonality), the aliasing warning is replaced by the following error message: "Error in t(Z) %*% ip : non-conformable arguments" That is when I enter this model: carbonmean<-lm(C

[R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
Thanks for your response Joris. I was aware of the potential for aliasing, although I thought that this was only a problem when you have missing cell means. It was interesting to read the vehement argument regarding the Type III sums of squares, and although I knew that there were different positi

[R] Nested ANOVA with covariate using Type III sums of squares in R

2010-06-02 Thread Anita Narwani
Hello, I have been trying to get an ANOVA table for a linear model containing a single nested factor, two fixed factors and a covariate: carbonmean<-lm(C.Mean~ Mean.richness + Diversity + Zoop + Diversity/Phyto + Zoop*Diversity/Phyto) where, Mean.richness is a covariate, Zoop is a categorical va

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-02 Thread Joris Meys
that's diversity/phyto, zoop or phyto twice in the formula. On Thu, Jun 3, 2010 at 3:00 AM, Joris Meys wrote: > That's what one would expect with type III sum of squares. You have Phyto > twice in your model, but only as a nested factor. To compare the full model > with a model without diversity

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-02 Thread Joris Meys
That's what one would expect with type III sum of squares. You have Phyto twice in your model, but only as a nested factor. To compare the full model with a model without diversity of zoop, you have either the combination diversity/phyto, zoop/phyto or phyto twice in the formula. That's aliasing.

[R] Nested ANOVA with covariate using Type III sums of squares

2010-06-02 Thread Anita Narwani
Hello, I have been trying to get an ANOVA table for a linear model containing a single nested factor, two fixed factors and a covariate: carbonmean<-lm(C.Mean~ Mean.richness + Diversity + Zoop + Diversity/Phyto + Zoop*Diversity/Phyto) where, *Mean.richness* is a covariate*, Zoop* is a categor

[R] Nested ANOVA

2009-11-11 Thread Plankton-81
Hello, I have the following data and would like to get some hints on how to analyze tis data, nested analysis? Habitats: 2 (Seagrass meadows and sandy bottoms) Seasons: 4 (Winter, Spring, Summer and Autumn) Locations: 4 (2 locations for for each habitat and season) Replicates: 3 replicates for

[R] Nested Anova and type II sum of square

2009-10-01 Thread Olga Ivanikova
Dear R-users, I’d like to make a nested anova on my data, and since I’m discovering both R and statistic, I’d like to be sure that I’m not doing something stupid. Here is my data: I’ve measured some variable responses (Y, for example leaf size) for different plants grown on three differ

Re: [R] Nested ANOVA residuals error

2009-07-16 Thread Daniel Malter
- cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Jeff DaCosta Gesendet: Thursday, July 16, 2009 3:37 PM An: r-help@r-project.org Betreff: [R] Nested ANOVA

Re: [R] Nested ANOVA residuals error

2009-07-16 Thread Bert Gunter
Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff DaCosta Sent: Thursday, July 16, 2009 12:37 PM To: r-help@r-project.org Subject: [R] Nested ANOVA residuals error I am having trouble setting up a nested anova model

[R] Nested ANOVA residuals error

2009-07-16 Thread Jeff DaCosta
I am having trouble setting up a nested anova model. Here is a truncated version of my data: > data Ind Treatment PC1 1 PER14SC 1.14105282 2 PER14SH 1.45348615 3 PER14AC 2.45096904 4 PER25SC 1.23687887 5 PER25SH 4.54797450 6 PER2

Re: [R] nested ANOVA with fixed and random variables missing data

2008-09-08 Thread Adam D. I. Kramer
On Mon, 8 Sep 2008, [EMAIL PROTECTED] wrote: I have a nested ANOVA, with a fixed factor "tmt" nested within "site" (random). There are missing values in the data set. aeucs, tmt and site have been defined as objects I have tried: model1=lme(aeucs~tmt,random=~1|tmt/site) I think you want lm

[R] nested ANOVA with fixed and random variables missing data

2008-09-07 Thread Lynise.Wearne
I have a nested ANOVA, with a fixed factor "tmt" nested within "site" (random). There are missing values in the data set. aeucs, tmt and site have been defined as objects I have tried: model1=lme(aeucs~tmt,random=~1|tmt/site) I get the following error message Error in na.fail.default(list(aeuc

Re: [R] nested anova and multiple comparisons

2008-04-26 Thread Kingsford Jones
Hi Stephen, On Sat, Apr 26, 2008 at 10:29 AM, Stephen Cole <[EMAIL PROTECTED]> wrote: .. > > 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 t

[R] nested anova and multiple comparisons

2008-04-26 Thread Stephen Cole
Hello R List: 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

Re: [R] Nested ANOVA models in R

2008-02-05 Thread Bill.Venables
venables/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Bolnick Sent: Wednesday, 6 February 2008 2:28 PM To: r-help@r-project.org Subject: [R] Nested ANOVA models in R Hi, I'm trying to work through a Nested ANOVA for the following sc

[R] Nested ANOVA models in R

2008-02-05 Thread Daniel Bolnick
Hi, I'm trying to work through a Nested ANOVA for the following scenario: 20 males were used to fertilize eggs of 4 females per male, so that female is nested within male (80 females used total). Spine length was measured on 11 offspring per family, resulting in 880 measurements on 80 families

Re: [R] Nested anova with unbalanced design and corrected sample size for spatial autocorrelation

2007-09-12 Thread Ben Bolker
Francesc Montan� ctfc.es> writes: > > > Hello all, > > This may be a simple question to answer, but I'm a little bit stumped with > respect to the calculation of the F statistics in nested anovas with > unbalanced design in R. I would strongly recommend getting a copy of Pinheiro

[R] Nested anova with unbalanced design and corrected sample size for spatial autocorrelation

2007-09-12 Thread Francesc Montan
Hello all, This may be a simple question to answer, but I'm a little bit stumped with respect to the calculation of the F statistics in nested anovas with unbalanced design in R. In my case, I have 11 vegetation transects (with 1000 10cmx10cm squares), where we estimated shrub cover. We have tw