Hi Doug

Your first model can't be right, as AM/PM is clearly a fixed effect: it has 
just two levels and you are only interested in making inferences about those 
two levels. So you can't have AMPM on the right of the random part of the 
model. Try not to think of nesting fixed effects in random effects. Think about 
specifying the structure of the nesting with the random effects, then the fixed 
effects are mapped onto the correct level automatically, lme is clever like 
that. You can always check the degrees of freedom also.

The second model sounds more sensible although you probably need to tell it 
explicitly that AM/PM corresponds to each measurement in your data, something 
like:

Mod.lme3 <- lme(bird_entropy ~ sound_entropy * landuse + AMPM, random = ~ 1 | 
plot/subplot, data=Bird)

This treats subplot as a random effect nested within plot, and each subplot has 
two measurements, AM and PM. This should handle the correlation between AM/PM, 
and you can plot residuals to see if there is any further residual correlation. 
If so, then you can perhaps consider one of the residual correlation structure 
models. You could go further and fit a full bivariate model between AM and PM, 
have a look at the paper by Doran and Lockwood 2006 for how to do this with lme.

regards
Mike


________________________________________
From: r-sig-ecology-boun...@r-project.org [r-sig-ecology-boun...@r-project.org] 
On Behalf Of dougwyu [doug...@gmail.com]
Sent: 13 March 2011 07:29
To: r-sig-ecology@r-project.org
Subject: [R-sig-eco] nested factor for which i would like a parameter   estimate

Hello all,

I am trying to test whether "sound diversity" predicts "bird diversity."

The question i have concerns how to deal with a factor that could be treated 
either as a random or fixed factor.

Response:  bird_entropy (continuous)
Fixed factors:   landtype (factor), sound_entropy (continuous), AM/PM (factor)
Random factor:  Plot

The problematic factor is AM/PM.

We have 29 total sampling plots, each of which is measured for sound_diversity 
at five subplots, once in the AM (dawn) and again in the PM (dusk), for a total 
10 measurements per plot.  (Each plot has only one, overall measure of 
bird_diversity).

On the one hand, AMPM is nested within plot, but on the other hand, we would 
like to estimate a parameter for AMPM, since we expect different suites of 
sound producers (not just birds) at different times of the day. However, it's 
reasonable to expect temporal correlation between AM and PM.


The first model seems uncontroversial to me (these are post-model-selection).

Mod.lme1 <- lme(bird_entropy ~ sound_entropy * landuse, random = ~ 1 | plot / 
AMPM, data=Bird)


But i'm curious to know if this second model is reasonable, and if so, how 
would I code the plot variable?

Mod.lme2 <- lme(bird_entropy ~ sound_entropy * landuse + AMPM, random = ~ 1 | 
plot, data=Bird)



Thanks all,

Doug
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
-- 
This message (and any attachments) is for the recipient only NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Reply via email to