Dear All, 
   
  I am trying to use stepAIC for an lmer object but it doesn't work. Here is an example:
   
  x1 <- gl(4,100)
x2 <- gl(2,200)
time <- rep(1:4,100)
  ID <- rep(1:100, each=4)
  Y <- runif(400) <=.5
  levels(Y) <- c(1,0)
  dfr <- as.data.frame(cbind(ID,Y,time,x1,x2))
   
   
  fm0.lmer <- lmer(Y ~ time+x1+x2 + (1|ID), data = dfr, family = binomial)
   
  fm.lmer <- stepAIC(fm0.lmer,scope = list(upper = ~I(time-6)*SF_0_N4*SEX, lower = ~1,trace = FALSE))
   
  I obtain the following error:
   
  Error in terms.default(object) : no terms component
   
  I would be very grateful for any suggestion,
   
  Bernard,
  
 
   
   

 		
---------------------------------

	[[alternative HTML version deleted]]


