Same values across covariate.predictions

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Same values across covariate.predictions

Postby AdamGreen » Mon Feb 01, 2016 2:29 pm

Hi,

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
AdamGreen
 
Posts: 9
Joined: Wed Apr 25, 2012 2:33 pm
Location: Colorado State University, USGS Fort Collins Science Center

Re: Same values across covariate.predictions

Postby jlaake » Mon Feb 01, 2016 2:38 pm

Is min.dist the name of the covariate used in the formula? It must match exactly so RMark knows which values to replace.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Same values across covariate.predictions

Postby AdamGreen » Mon Feb 01, 2016 2:45 pm

Jeff,

min.dist is the name I gave in the model specification, but I have them as primary occasion-specific columns in process.data$data (i.e., min.dist1, min.dist2, ..., min.dist28). Would that make a difference?

Adam
AdamGreen
 
Posts: 9
Joined: Wed Apr 25, 2012 2:33 pm
Location: Colorado State University, USGS Fort Collins Science Center

Re: Same values across covariate.predictions

Postby jlaake » Mon Feb 01, 2016 2:51 pm

Yes it does. Your need to specify values for one or all depending on what you are trying to accomplish. Using min.dist in the formula but in the design matrix it uses min.dist1,...min.dist28 etc and that is what is being replaced so those are the values you need to specify.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Same values across covariate.predictions

Postby AdamGreen » Mon Feb 01, 2016 8:38 pm

Sorry for so many questions, Jeff, but I'm still getting the same predictions for a group across the covariate values. I'm predicting for 50 values of the covariate, and I've tried inputting the covariate values as a 50x28 matrix (28 primary occasions), a # groups x 28 matrix, and their transposes. Because of our sampling design, we had to trick the model a bit. We have a site with 4 treatments sampled at 7 biweekly intervals with 4 replicate surveys, so we treated a primary occasion as a treatment by biweek (i.e., 28). Therefore, I would like an estimate for each primary occasion. What am I missing? Should the covariate values be input as a matrix? Thanks.

Adam
AdamGreen
 
Posts: 9
Joined: Wed Apr 25, 2012 2:33 pm
Location: Colorado State University, USGS Fort Collins Science Center


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron