Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-10 Thread Mike Dunbar
Hi Joe Is time a continuous variable or a factor? The thing is that the terms ARE nested. The nesting is defined by the random effects structure. The fixed effects slot into that. They way this happens is defined by the coding in the data. So I assume you have something like (simplified):

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-10 Thread Mike Dunbar
(apologies - I should have written coast * MBL not ML) I'm not sure of my ground here, but surely do lose something - you wouldn't retain coast:MBL if it's not significant, as you lose degrees of freedom, and this gets worse the more terms and the more interactions you consider. I think it's

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-10 Thread hadley wickham
The coast * ML term tests for HSP high/low dependent on coast. To test this fit the full model with method = ML and compare it to lme(HSP~coast+MBL, random= ~1|site, method =ML) using anova(model1, model2). There are alot of technical issues with testing both fixed and random effects in

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-10 Thread hadley wickham
On Mon, Nov 10, 2008 at 9:22 AM, Mike Dunbar [EMAIL PROTECTED] wrote: (apologies - I should have written coast * MBL not ML) I'm not sure of my ground here, but surely do lose something - you wouldn't retain coast:MBL if it's not significant, as you lose degrees of freedom, and this gets

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-10 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hadley wickham wrote: On Mon, Nov 10, 2008 at 9:22 AM, Mike Dunbar [EMAIL PROTECTED] wrote: (apologies - I should have written coast * MBL not ML) I'm not sure of my ground here, but surely do lose something - you wouldn't retain coast:MBL if

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-10 Thread hadley wickham
On Mon, Nov 10, 2008 at 2:02 PM, Ben Bolker [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hadley wickham wrote: On Mon, Nov 10, 2008 at 9:22 AM, Mike Dunbar [EMAIL PROTECTED] wrote: (apologies - I should have written coast * MBL not ML) I'm not sure of my ground

[R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-07 Thread Joe Simonis
Hey Everyone, I'm helping a friend out with analyzing some of her data, and I haven't run an ANOVA like this in a while, and especially not in R. I'm having a bit of trouble figuring out the correct syntax and so I was hoping to get feedback. Any input would be welcomed. As of now, I

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-07 Thread Mike Dunbar
Hi Joe I think the command you want is probably simpler than you think: lme(HSP~coast*MBL, random= ~1|site) or lme(HSP~coast+MBL, random= ~1|site) coast and MBL have distinct levels so are fixed and site is random as you say. Having site as random will take into account that there

Re: [R-sig-eco] Question About Syntax For Complex ANOVA Design

2008-11-07 Thread Joe Simonis
Hi Mike, Thanks for the response, hopefully we can get this thing figured out. And I hope things will be easier than I think--that's usually a good thing! However, I do wonder if I didn't explain myself fully (too often the case). My apologies for not clearly stating the hypotheses.