[R-sig-ME] mixed models advice
Teresa Catry
teresa_catry at yahoo.com
Thu Sep 1 00:28:45 CEST 2011
Dear all,
I was wondering if someone could help me with solving the problem below.
I've collected data on the distribution of birds feeding in estuarine areas.
This dataset consists of the number of observations of individually marked birds feeding in different micro-habitats (in dry substrate, in water above knee and below knee). The sex of the individuals is also known, so the table (attach) looks like this :
ind Year hab sex n total prop
1 GG-LGf 2009_2010 above_knee M 1 5 0.2
2 GG-LGf 2009_2010 below_knee M 4 5 0.8
3 GG-LGf 2009_2010 no_water M 0 5 0.0
7 GG-OGf 2009_2010 above_knee M 0 19 0.0
8 GG-OGf 2009_2010 below_knee M 0 19 0.0
9 GG-OGf 2009_2010 no_water M 19 19 1.0
where “n” is the number of times the bird was seen in each habitat class and “total” represents the total number of times it was observed (so the same “total” is repeated 3 times, for the three levels of the factor hab).
Some individuals were observed in two years, but perhaps we can forget about that for the moment.
What I would like to test is whether males and females differ in the extent to which they use different microhabitats, so I was trying to look at an interaction between habitat (hab) and sex.
The first idea was to use a repeated measures model, because each individual was observed at each level of hab, and so we tried two (probably wrong) approaches:
lme(cbind(n, total-n)~sex*hab+(1|ind), family=binomial, data=ourdata)
lme(n~sex*hab++(1|ind)+offset(I(log(total))), family=poisson, data=ourdata)
One of the problems is, of course, the proportion for each individual sum up to 1, and so one of the values is totally dependent on the other two. Possibly another problem is that we are inflating n by repeating the number of observations made in each individual at each level of the factor. Finally, I am not even sure about the syntax and the approach.
Any hint on sorting this out this problem would be greatly welcomed. Thanks in advance,
best regards,
Teresa
Teresa Catry
Museu Nacional de História Natural
Rua da Escola Politécnica 58
1250-102 Lisboa
tel: +213921885
fax: +213969784
http://www.cesam.ua.pt/teresa_catry
https://sites.google.com/site/migratagis
More information about the R-sig-mixed-models
mailing list