I am trying to make predictions across values of a covariate for several groups in the multiscale occupancy model, some of which are groups designated in process.data while others are just discrete covariates. I believe I have identified the correct indices for each combination of groups/factors (ddl$Theta$model.index), but when I run covariate.predictions across the entire model set, the predictions don't vary across the covariate values. I thought the effect of the covariate might be averaged out across models, but I'm getting the same results when I predict using the top model, which has the covariate in it and a pretty strong effect (beta=-1.0114563, SE=0.2408405). The covariate of interest is in most of my top models, so it should have a decent effect on the predictions. From what I can tell, the predicted estimates are grouped by value then index (i.e., value 1, index 1; value 1, index 2;...value 2, index 1; value 2, index 2;...value n, index k). Is that correct? Here's the code for the call to covariate.predictions:
- Code: Select all
Thetabymindist.top=covariate.predictions(theta.pred,data=data.frame(min.dist=mindist.vals),indices=c(pred.cov.comb$mod.index))
theta.pred is the model set over which I want to make predictions, mindist.vals is the vector of covariate values, and pred.cov.comb$mod.index are the model indices corresponding to each group. The predictions are different for each group but don't vary within a group. Any ideas?
Thanks,
Adam