RMark: model-averaging with covariates

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

RMark: model-averaging with covariates

Postby gstauffer » Fri Nov 09, 2012 2:32 pm

When model averaging is carried out with

model.average(model.list,"Phi",vcv=TRUE)

the result is a dataframe that includes estimates, se, confidence limits, parameter indices, etc. But suppose I want to predict real parameter estimates based on certain values for occasion-specific covariates, and then I want to average the predictions from each model. I could proceed as follows:

1) Construct a design matrix with the desired covariate values, then use ‘compute.real(model,design)’ to get the real parameter estimates.
2) Use model.average(list(estimate=estimate,weight=weight,vcv=vcv)) to get the model-averaged estimates, where ‘compute.real’ supplies the values to populate ‘estimate’.

This works well, but does not return a dataframe with confidence limits for the model averaged estimates, as above. Only se and vcv, if specified, are provided, and given that plus/minus 1.96*se often is not satisfactory, I am not sure how to get confidence limits from this output.

I suppose I could model-average betas (by hand, assuming they all have the same interpretation), then use the beta=beta argument in ‘compute.real’ to compute model-averages reals from the model-averaged betas. But I think the CIs still would not be correct if the variances(or vcv) for the averaged betas are not also supplied.

Can anyone provide a further suggestion, or point out what I am missing?
gstauffer
 
Posts: 17
Joined: Thu Sep 03, 2009 11:51 am

Re: RMark: model-averaging with covariates

Postby jlaake » Fri Nov 09, 2012 2:37 pm

covariate.predictions was designed just for that. The first argument can be a marklist in which case it computes the reals for each model and computes the model averaged values and std err etc. Note that the indices for the real parameters are based on the non-simplified indices so that they are the same across all models.

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

Re: RMark: model-averaging with covariates

Postby gstauffer » Fri Nov 09, 2012 3:20 pm

Jeff,

That's right, you do discuss this in another thread (http://www.phidot.org/forum/viewtopic.php?f=21&t=1702&p=7036&hilit=covariate+predictions#p7036).

So, would I need to first convert the occasion-specific covariates to time-varying individual covariates, then re-run the analysis with a dm that looks something like :

1 Cov1.1 Cov2.1
1 Cov1.2 Cov2.2
1 Cov1.3 Cov2.3
1 Cov1.4 Cov2.4
etc.

Or would it work to manipulate the existing dm to look like this (i.e., replace covariate values with covariate names), to avoid the need to time-consuming model re-runs?

Thanks,
Glenn
gstauffer
 
Posts: 17
Joined: Thu Sep 03, 2009 11:51 am

Re: RMark: model-averaging with covariates

Postby jlaake » Fri Nov 09, 2012 6:00 pm

Sorry for not reading your first post more thoroughly. This issue with design covariates has come up recently as you found. Unfortunately, I've not been able to address this with code yet but it could be done. Your suggestion in the second post might work but would be cumbersome if you had many models. It sounds like you are close with the compute.real approach but only need confidence intervals. That was not done with model.average.list because it is generic with no specification of the link functions. If the parameters are probabilities as most are, you can use the logit transform on the model averaged reals, compute the vcv matrix on the logit scale from the real vcv, compute +/- 1.96 se ci on the logit scale and then use the inverse logit to get the end points of the ci on the real scale. The functions and code to do this can be found in model.average.marklist or functions it calls. It would probably be worth pulling this out as a separate function.

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


Return to RMark

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron