[R] nested design in lme, need help with specifying model

Radka Ptacnikova rpichlova at yahoo.com
Mon Feb 26 00:32:45 CET 2007


Hi,

I wonder if anyone can help me with specifying a right model for my analysis. I am a beginner to lme methods and though have spent already many hours studying from various books an on-line helps, I was unfortunately not able to find a solution to my problem on my own. 

Data structure:
I studied escape behavior of three species of a prey to a predator. The prey specimens (many) were in a vessel, together with one predator. Escape responses were video-recorded when a prey approached the predator close enough and jumped consequently away. Each set was run twice with a fresh predator and a fresh set of the prey specimens, leading to two replicates per treatment. Unequal number of shots (i.e. prey specimens) were analyzed in each of the two replicates for each of the three prey species (range 11-19). The data are therefore unbalanced and also variance for treatments/replicates is far from being homogeneous, so that a nested anova is not a good choice here. As the number of prey specimens was rather high, I assume that each shot represents a different prey individual. 

My questions:
1) Do the three prey species significantly differ in their escape response?
2) What was variability between replicates within a species and how much did it contribute to overall variability?

Now, to my best understanding, the model should be:

mod1<-lme(Escape.parameter~Species, random=~1|Species/Replicate)

as I am interested in Species as fixed effects and want to know variability caused by Replicates nested within Species as random effects. However, when running this model, I get 

Random effects:
 Formula: ~1 | Species
        (Intercept)
StdDev:    2.937479

 Formula: ~1 | Replicate %in% Species
        (Intercept) Residual
StdDev:    4.973931 4.266302

Fixed effects: Max_speed ~ Species 
                Value Std.Error        DF   t-value p-value
(Intercept) 23.792040  4.798143 39  4.958593       0
Spec2     -7.121766  6.747930   0 -1.055400     NaN
Spec3      -9.779830  6.725391  0 -1.454165     NaN

So I get variance within species and within replicates, but what the hell are these zero DF's, leading to zero p's and how should I interpret them?


Another model I tried was:
mod2<-lme(Escape.parameter~Species, random=~1|Replicate)

Random effects:
 Formula: ~1 | Replicate
         (Intercept) Residual
StdDev: 0.0002733313 5.180472

Fixed effects: Max_speed ~ Species
                              Value Std.Error        DF   t-value       p-value
(Intercept)                26.00364  1.561971  41  16.647963   0e+00
SpeciesSpec2          -7.93297  2.056430  41  -3.857641   4e-04
SpeciesSpec3        -11.81048  1.962713  41  -6.017425   0e+00

Alright, I get the among species differences, but I am confused here with the very low StdDev of Replicate as a random effect, since I know f.ex. from a plot, that it is relatively high. Which leads me to thinking, that something is wrong here. 

I'd appreciate any hints and suggestions.

Radka






 
____________________________________________________________________________________
Never Miss an Email



More information about the R-help mailing list