Package mra df help

Hi, I'm using package mra to run CJS models, and I'm having trouble understanding how df is calculated. I have two models that I think should have the same df, but without coercion, one has 1 df and the other has 3. The covariates are year and season. I have four years and three seasons. I'm have 83 individual capture histories over four sampling periods. The top of the ch matrix looks like this:
The top of the year matrix looks like this:
The top of the season matrix looks like this:
Both year and season are integers. Here is the code for both models:
Here are the results:
Why does the df differ between models?
- Code: Select all
c1 c2 c3 c4
[1,] 1 0 0 0
[2,] 1 0 0 0
[3,] 1 1 0 0
[4,] 1 1 0 0
[5,] 1 0 0 0
The top of the year matrix looks like this:
- Code: Select all
c1 c2 c3 c4
1 2021 2021 2021 2021
2 2021 2021 2021 2021
3 2021 2021 2021 2021
4 2021 2021 2021 2021
5 2020 2020 2020 2020
The top of the season matrix looks like this:
- Code: Select all
c1 c2 c3 c4
1 1 1 1 1
2 1 1 1 1
3 2 2 2 2
4 2 2 2 2
5 2 2 2 2
Both year and season are integers. Here is the code for both models:
- Code: Select all
year.cjs <- F.cjs.estim(capture = ~ 1, survival = ~ year.mat,
histories=ch.mat)
seas.cjs <- F.cjs.estim(capture = ~ 1, survival = ~ seas.mat,
histories=ch.mat)
Here are the results:
- Code: Select all
F.cjs.estim(capture = ~1, survival = ~year.mat, histories = ch.mat)
Capture var Est SE Survival var Est SE
(Intercept) 2.04405 0.64901 (Intercept) 1.889 0.49182
year.mat -0.00111 0.00024
Message = SUCCESS: Convergence criterion met
Link = logit
Model df = 1
Std Errors and QAIC adjusted for C_hat = 1 on 0 df
Log likelihood = -97.5681262896564
Deviance = 195.136252579313
AIC = 197.136252579313
AICc = 197.185635295362
QAIC = 197.136252579313
QAICc = 197.185635295362
Population Size Estimates (se):
N2=40 (3.71), N3=11 (1.47), N4=7 (1.06),
- Code: Select all
F.cjs.estim(capture = ~1, survival = ~seas.mat, histories = ch.mat)
Capture var Est SE Survival var Est SE
(Intercept) 1.82267 0.61578 (Intercept) 0.44488 0.56501
seas.mat -0.33433 0.25645
Message = SUCCESS: Convergence criterion met
Link = logit
Model df = 3
Std Errors and QAIC adjusted for C_hat = 1 on 0 df
Log likelihood = -96.5329746777274
Deviance = 193.065949355455
AIC = 199.065949355455
AICc = 199.369746823809
QAIC = 199.065949355455
QAICc = 199.369746823809
Population Size Estimates (se):
N2=41 (4.32), N3=12 (1.69), N4=7 (1.22),
Why does the df differ between models?