Skip to content
Prev 3229 / 20628 Next

Trend in total number of animals

Dear Thierry,

I THINK the fixed effect slope should be what you're after if you want  
to predict the change in log numbers, but simply exponentiating the  
prediction will not give you a true measure of the arithmetic increase.

The arithmetic prediction for years 1:10 (for example) when the slope  
variance for the year|room term is zero would be:

exp(b_year*1:10+0.5*(v1+v2))

where b_year is your slope estimate, and v1 is the year intercept  
variance and v2 is the room intercept variance.

When slope variance exists this becomes more difficult, because it  
implies the variance v2 changes as a function of year. In this case:

v2=diag(Z%*%V2%*%t(Z))

where

Z<-cbind(rep(1,10), 1:10)

and V2 is the covariance matrix of the room intercept-slopes.

Or if you like

v2 = V2[1,1]+(1:10)*V2[1,2]*2+(1:10^2)*V2[2,2]

Another difficulty is the possibility that your missing data are not  
"completely missing at random". By default lmer just seems to omit  
missing data rather than dealing with it properly, but perhaps there  
is an argument that can be passed to na.omit which suppresses this? If  
so, then the less strict assumption of "missing at random" can be  
made. In this latter case the missing data only have to be random  
conditional on the observed data - for example, if there were no bats  
in room A in year 1 which made the field workers less inclined to  
visit room A in year 2 based on their knowledge of the 1'st year's  
count.

Cheers,

Jarrod

Quoting "ONKELINX, Thierry" <Thierry.ONKELINX at inbo.be>: