Page 1 of 2
deviance for models with individual covariates

Posted:
Wed Jan 25, 2012 9:57 pm
by ked
Hi, I'm doing a pretty straight-forward CJS analysis in RMark with both individual covariates (e.g. body mass) and environmental covariates (e.g. weather). Models containing an individual covariate have much higher deviances compared to models with no covariates or only environmental covariates only. On some level, this makes sense to me, but it certainly looks strange in a results table and I wanted to check that this was normal.
I read in the MARK forum that having individual covariates in your .inp file will increase the deviance of all models, since MARK will use a different saturated model in the calculation. Does RMark do this differently -- increasing the deviance only for certain models? Is there a way to change this?
Otherwise, am I correct in thinking there's no way to calculate the proportion of the deviance explained by individual covariates (ANODEV or R2_Dev)? I guess my other option is to try doing the analysis directly in MARK, but I would like to avoid that if at all possible, just because it's a large data set and will take quite a while to set up the DMs.
Thanks in advance for any input.
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 1:25 pm
by dhewitt
This might be old news to you, but RMark just sends models to MARK and gets the resulting estimates and statistics from the optimization routine used by MARK. So in 99.9% of cases you see the same output in RMark that you see in MARK. In rare cases (maybe none now?), Jeff might manipulate some output differently in RMark for display (e.g., the model table) than the default output in MARK, but I doubt this is one of those cases. If any of this is new to you, you should really read the appendix for RMark in the MARK GIM book.
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 4:25 pm
by ked
Yes, I'm aware the same mark.exe is used, but I also know (from the RMark appendix to the "Gentle Introduction") that RMark handles individual covariates somewhat differently.
In any case, I believe the deviances shouldn't vary so much between models with competitive AICc scores (e.g. 1620 for a model without individual covariates vs. 6520 for one with), which leads me to believe the deviances are being calculated differently. Any ideas why this might be happening?
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 4:42 pm
by dhewitt
No. Have to leave this to Jeff or someone else with closer ties to the ind covs issues.
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 4:45 pm
by bacollier
Ked,
Hmmm, I had to go back and look in the MARK help index on this one and I don't have a good answer, but it seems that under CJS without individual covariates would have a different method than a model set with individual covariate, but from the help index all is says is that a 'different method' will be used if individual covariates are used (which you probably already know).
I don't think that the way RMark (and I cannot find anywhere it says it would) handle's individual covariates on the front end would cause you too see differences in the deviance values different than what you would see if you had used MARK as RMark passes the input files the same way that MARK would so if a different method was used it would be used for both.
So, I don't 'think' (caveat emptor) that there is a RMark difference, but maybe Jeff will chime in if I am wrong.
Bret
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 5:14 pm
by darryl
Can you check the -2log-likeihood value for the saturated model in RMARK? It's given in the MARK output file. If so, you can check to see whether that value is the same in all models to see if the same saturated model is being used. When you don't have covariates, all individuals will get pooled into the same cohort, but when you have covariates, each unique combination of covariates defines a separate cohort, which is what gives you a different saturated model. If the -2l(saturated) is different that may suggest different pooling rules are being used for the different models depending on whether individual covariates are included in the model or not.
If the saturated models are different and you want to use ANODEV-type stuff, then you could use the -2log-likelihood for the fitted model rather than the deviance value, if RMARK gives you that.
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 6:18 pm
by ked
Yes the -2log-likelihood for the saturated model is 0 for the models with individual covariates, but ~4908 for the others, which accounts for the huge difference in deviances. So I think I can just adjust the deviances so they're all compared to the same saturated model. Thanks!
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 7:50 pm
by jlaake
As you have worked out the null deviance is different with/without individual covariates. You can use the argument use.lnl in model.table to build a table using -2log liklelihood instead of residual deviance.
--jeff
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 8:09 pm
by cooch
ked wrote:Yes the -2log-likelihood for the saturated model is 0 for the models with individual covariates, but ~4908 for the others, which accounts for the huge difference in deviances. So I think I can just adjust the deviances so they're all compared to the same saturated model. Thanks!
Don't think so, since the true saturated model for a model with covariates is not defined (to my knowledge). If I recall correctly, that is why MARK reports the saturated likelihood as 0. There really is no major reason to talk about 'percent variation explained' (which I think is the motivation). Simply report evidence ratios or the equivalence. Those are legit.
Re: deviance for models with individual covariates

Posted:
Thu Jan 26, 2012 9:06 pm
by cooch
cooch wrote:ked wrote:Yes the -2log-likelihood for the saturated model is 0 for the models with individual covariates, but ~4908 for the others, which accounts for the huge difference in deviances. So I think I can just adjust the deviances so they're all compared to the same saturated model. Thanks!
Don't think so, since the true saturated model for a model with covariates is not defined (to my knowledge). If I recall correctly, that is why MARK reports the saturated likelihood as 0. There really is no major reason to talk about 'percent variation explained' (which I think is the motivation). Simply report evidence ratios or the equivalence. Those are legit.
More specifically, for any of the models with individual covariates (CJS or otherwise), the sample size for each encounter history is 1. The saturated model then has a -2 log likelihood value of zero. The deviance for any model with individual covariates is then just its -2 log likelihood value.