I’ m running a robust design analysis using RMark with 12 primary sessions, each consisting of 5 trapping days. In the analysis, an individual covariate related to habitat (numeric variable from 0 to 1) is included.
My questions refer to the individual covariate input in RMark and the related deviance/AICc computations.
I read the capture history data from a text file and created the design data as follow:
- Code: Select all
#capturedata.txt contains the capture history data followed by the sex group and the individual covariate (referred to as ‘habitat’)
squirrel=read.table("capturedata.txt",sep="\t",h=T)
time.intervals=c(0,0,0,0, 1,0,0,0,0, 0.31,0,0,0,0, 0.67,0,0,0,0, 0.34,0,0,0,0,0.33,0,0,0,0,0.34,0,0,0,0,0.29,0,0,0,0,0.31,0,0,0,0,0.42,0,0,0,0,0.31,0,0,0,0,0.29,0,0,0,0)
squirrel.process=process.data(squirrel, model = "Robust",time.intervals=time.intervals,groups=c("sex"))
squirrel.ddl=make.design.data(squirrel.process)
I didn’t mention the name and the number of individual covariate in this coding. However, the name was specified in capturedata.txt.
I run 2 models for which survival was considered i) constant and ii) as a function of the individual covariate ‘habitat’.
The two deviances were found very different whereas AICc values were surprinsingly close (according to the number of parameters and deviance values).
- Code: Select all
Npar AICc Deviance
S(~1) 28 1601.506 1883.738
S(~habitat) 29 1597.718 1536.682
To better understand the deviance differences, I performed the same models from 2 datasets, WITH and WITHOUT the individual covariate in MARK software.
- Code: Select all
#From the dataset WITH individual covariates in MARK:
Npar AICc Deviance
s(~1) 28 1600.882 1542.052
s (~habitat) 29 1596.856 1535.820
#From the dataset WITHOUT individual covariates in MARK:
Npar AICc Deviance
s(~1) 28 1601.703 1883.934
Based on these results, we found quite close but not similar values of deviance and AIC between models in MARK and RMark (maybe due to different link functions). And the deviance of S(~1) in RMark refer to the deviance calculated from the capture history dataset WITHOUT covariate.
The expected deviance of S(~1) in RMark is 1542.052.
So, I was wondering:
- If RMark can adjust the AICc for models including individual covariate?? In that case, I can compare my models and the coding is correct (but see my last paragraph on ind. covariate plots)
- Or if my coding to input data or to define models in RMark was wrong? Do I need to mention the individual covariate before defining and running the set of models?
However, I get the same results using the function convert.inp:
squirrel=convert.inp("D:/capturedata.inp", group.df=data.frame(sex=c("Female","Male")), covariates=c("habitat"))
I used the individual covariate plot function in MARK as well as the covariate.predictions function in RMark to compare the effect of the individual covariate. I found both negative effect of the individual covariate but different fit (i.e. different values of survival rates and bigger CI in RMark)…
Any ideas what this is about? And how to solve it??
THANKS!
C. Le Coeur