
Hello,

 

I'm conducting an experiment where I trenched plots (treatment) in secondary forests of three age classes: young (4 years), intermediate (8-11 years) and old (28 years). There are six secondary forests (two in every class) divided in two farms and in every second-growth forest I paired five treatmento and control plot at random, and in each plot I planted 2 individuals of each species I'm studing.

 

Rechapting: there are two farms, three secondary forests on each farm (one of each age class), five pairs of treatment and control plot in every secondary forest.

 

I want to estimate the parameters for the interaction between age classes and treatment (fixed effects), and specify that farm and the pairs are random variables, however, I'm not being able to do so. The estimated variance for the farms variable is zero. Any help is aprecciated.

 

Here is an example I'm using for survival.

 

farm<-factor(rep(1:2,each=30))
treatment<-factor(rep(0:1,times=30))
pair<-factor(rep(1:30,each=2))
age<-ordered(rep(1:3,each=10,times=2))
survival<-rbinom(60,0:2,0.5)
death<-2-survival

 

surv1<-glmer(cbind(survival,death)~age+treatment+age:treatment+(1|farm)+(1|pair),family=binomial)

 

Generalized linear mixed model fit by the Laplace approximation 
Formula: cbind(survival, death) ~ age + treatment + age:treatment + (1 | farm) + (1 | pair) 
   AIC   BIC logLik deviance
 104.2 121.0  -44.1     88.2
Random effects:
 Groups Name        Variance Std.Dev.
 pair   (Intercept)  0        0      
 farm   (Intercept)  0        0      
Number of obs: 60, groups: pair, 30; farm, 2


Fixed effects:
                 Estimate Std. Error z value Pr(>|z|)   
(Intercept)       -0.8952     0.2946 -3.0385  0.00238 **
age.L             -0.8384     0.5072 -1.6529  0.09835 . 
age.Q              0.2491     0.5134  0.4853  0.62745   
treatment1        -0.2556     0.4294 -0.5951  0.55178   
age.L:treatment1   1.2881     0.7659  1.6817  0.09263 . 
age.Q:treatment1  -0.9004     0.7210 -1.2488  0.21173  

 

 

In these case, both "pair" and "farm" had variances zero. Why? What I'm doing wrong?

 

These p-values for the fixed effects are from the Wald test? If not, how can I perform the Wald test to test the effects of the fixed effects??

 

I appreciate any help!

 

Thanks,

 

Guilherme

 

 

 

 

 

 
 		 	   		  
	[[alternative HTML version deleted]]


