Re: [R-sig-eco] Unifrac distance matrix with dbRDA in Vegan

2012-04-24 Thread dougwyu
Hi Jari,

Thanks.  That's what i thought, but i was confused by this:  I changed metaMDS 
function in vegan so that it easily accepts unifrac distances

I thought it was something to do with formatting or a special unifrac output 
file or something.

doug

On 23 Apr 2012, at 12:36, Jari Oksanen wrote:

 
 On 23/04/2012, at 04:19 AM, dougwyu wrote:
 
 
 By the way, I changed metaMDS function in vegan so that it easily accepts 
 unifrac distances a couple of years ago after I was in a workshop with 
 Susan Letcher, and she suggested I do this.
 
 Cheers, Jari Oksanen
 
 
 Would you please point us to any documentation for importing unifrac 
 distance matrices into vegan?  (nothing specific about unifrac turns up in 
 the vegan documentation)
 
 I was about to do this and was under the impression that i could treat 
 unifrac matrices like any other distance matrix.  
 
 Doug,
 
 It is not about vegan but about R: vegan uses R dissimilarity/distance 
 structures (that inherit from class dist). Once you got it into R it is in 
 vegan, and there is nothing specific to vegan. 
 
 Cheers, Jari Oksanen
 -- 
 Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
 jari.oksa...@oulu.fi, Ph. +358 400 408593, http://cc.oulu.fi/~jarioksa
 
 
 

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] nested factor for which i would like a parameter estimate

2011-03-14 Thread dougwyu
Thanks very much Mike.  It clears things up immensely now that i'm not thinking 
about nesting fixed effects inside random effects, and the model and dfs make 
sense.

doug

On 13 Mar 2011, at 21:04, Dunbar, Michael J. wrote:

 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 recipien...{{dropped:6}}

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] nested factor for which i would like a parameter estimate

2011-03-12 Thread dougwyu
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