Page 1 of 1

### Package mra df help

Posted: Sun Mar 19, 2023 6:28 pm
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:

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   c41  2021 2021 2021 20212  2021 2021 2021 20213  2021 2021 2021 20214  2021 2021 2021 20215  2020 2020 2020 2020`

The top of the season matrix looks like this:

Code: Select all
`c1 c2 c3 c41   1  1  1  12   1  1  1  13   2  2  2  24   2  2  2  25   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 metLink = logitModel df =  1Std Errors and QAIC adjusted for C_hat =  1 on 0 dfLog likelihood =  -97.5681262896564Deviance =  195.136252579313AIC =  197.136252579313AICc =  197.185635295362QAIC =  197.136252579313QAICc =  197.185635295362Population 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 metLink = logitModel df =  3Std Errors and QAIC adjusted for C_hat =  1 on 0 dfLog likelihood =  -96.5329746777274Deviance =  193.065949355455AIC =  199.065949355455AICc =  199.369746823809QAIC =  199.065949355455QAICc =  199.369746823809Population Size Estimates (se):N2=41 (4.32),  N3=12 (1.69),  N4=7 (1.22), `

Why does the df differ between models?

### Re: Package mra df help

Posted: Sun Mar 19, 2023 6:34 pm
I'll ask the obvious question -- this is an 'RMark' forum, not mra (which is a separate package altogether). I'm curious as to your logic in posting a question about mra here? Why not contact the mra maintainer(s)? I'm sure Eric, Trent and Bryan would be happy to help (I doubt a post to the usual CRAN support forums would yield much).

I'll leave this open for a day, then delete - this forum supports some applications, but it is not a 'general support' forum.

### Re: Package mra df help

Posted: Sun Mar 19, 2023 7:07 pm
I'm sorry if this is the wrong forum, I saw that there was a post here discussing mra a few years back, so I thought someone here might be able to help. There's not much discussion about this package online, and I don't know where else to find people who may have used it. I'll try to contact the mra maintainers.

### Re: Package mra df help

Posted: Sun Mar 19, 2023 7:17 pm
mra is a clever package that virtually no one outside of the maintainers (and their consulting firm) uses. And, as a result, support for same is largely confined to whatever the maintainers might be willing to provide.

On the other hand, RMark is very widely used, is extremely well-documented, and is supported to a phenomenal degree by Jeff Laake (who developed and maintains the package). Quite honestly, unless you have a compelling reason (or something silly like a 'supervisor says you need to use mra because someone she/he knows used it in a similar study', which isn't even a remotely legitimate reason), switch to RMark.