Dear List,

I am having trouble to predict a raster when my best model has an offset. My final model is:

m1 <-glm(CHIMMON_b ~ depth + offset(log(haul_numb)), family = binomial, data = datafit_elasmo)

The offset is included as the sample effort is not constant over the years so I have to account for this problem.

When I try to use the predict function (in the raster package) I get this error message:

 v<-predict(env_pred, best_glmCHIMMON_b, filename="FINAL_model_binary", fun=predict)

Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) :
  variable lengths differ (found for 'offset(log(haul_numb))')

Can anyone help me?

Thank you!
Valentina






	[[alternative HTML version deleted]]

