[R-sig-eco] multilevel mixed effects LME and LMER

Humberto Dutra hpdutra at yahoo.com
Sun Jul 13 22:48:22 CEST 2008


First I would like to say thank you for taking the time to read it.

Here is my problem.
I did an experiment to access the impact of an invasive plant on mice behavior and abundacne. Basically  I  manipulated fruits and vegetation to two
levels each(present and absent) on 12 experimental plots The design consisted of  12 plots,
divided in 3 blocks.  So each block had 4 plots assigned to one of the
following treatments. 
Fruit intact and Vegetation intact 
Fruit intact and Vegetation removed 
Fruit removed and Vegetation intact 
Fruit removed and Vegetation removed 
Then I sampled mice activity by recording the presence or absence of paw prints on 16 track plates positioned on each plot. 
I also measured the number of trees on each plot and got their diameter. I created an index for tree cover and I want to use it as covariate. 
My goal is to determine how the interaction of fruits, vegetation, and time explain the mice behavior. 

Because my data is binary and I have fixed (fruit, veget, time) and random effects (block, and trackID as repeated measures) I am trying to fit a model using lmer. 
here is my first attempt
model<-lmer(track~veget*fruit*time*(time|plate)*(1|block),family=binomial)
 
My problem is that when I run this model I get more than 1000 degrees of freedom. Which does not make any sense, remember:
16 plates
2 levels for fruits
2 levels for veget
3 blocks
7 months (time)
so I don't know what it is going on. Should I group this by plot ID instead of plate?
check a sample of the data on the end.

Also, how do I fit a covariate in these model. Especially when it comes to data format. I have just one indez per plot, how do I add this to the model. Should I repeat the same value for all the 16 plates in that plot? 

Thank  you very much for any comments. 

  plate track time block   fruit   veget
> 1        1     0    1     1  intact  intact
> 2        2     1    1     1  intact  intact
> 3        3     1    1     1  intact  intact
> 4        4     0    1     1  intact  intact
> 5        5     1    1     1  intact  intact
> 6        6     1    1     1  intact  intact
> 7        7     1    1     1  intact  intact
> 8        8     1    1     1  intact  intact
> 9        9     0    1     1  intact  intact
> 10      10     1    1     1  intact  intact
> 11      11     0    1     1  intact  intact
> 12      12     1    1     1  intact  intact
> 13      13     1    1     1  intact  intact
> 14      14     1    1     1  intact  intact
> 15      15     0    1     1  intact  intact
> 16      16     0    1     1  intact  intact
> 17      17     0    1     1  intact removed
> 18      18     0    1     1  intact removedt
> 19      19     1    1     1  intact removed
> 20      20     1    1     1  intact removed
> 21      21     0    1     1  intact removed
> 22      22     0    1     1  intact removed
> 23      23     1    1     1  intact removed
> 24      24     1    1     1  intact removed
> 25      25     0    1     1  intact removed
> 26      26     1    1     1  intact removed
> 27      27     0    1     1  intact removed
> 28      28     0    1     1  intact removed
> 29      29     0    1     1  intact removed
> 30      30     1    1     1  intact removed
> 31      31     0    1     1  intact removed
> 32      32     0    1     1  intact removed
> 33      33     0    1     1 removed  intact
> 34      34     0    1     1 removed  intact
> 35      35     0    1     1 removed  intact

==========================================================
'Discipline - Success doesn't just happen. You have to be intentional about it, and that takes discipline.' - John Maxwell



More information about the R-sig-ecology mailing list