Package mra df help

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

Package mra df help

Postby abdnas » 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   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?
abdnas
 
Posts: 4
Joined: Sun Jan 08, 2023 12:23 am

Re: Package mra df help

Postby egc » 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.
egc
Site Admin
 
Posts: 201
Joined: Thu May 15, 2003 3:25 pm

Re: Package mra df help

Postby abdnas » 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.
abdnas
 
Posts: 4
Joined: Sun Jan 08, 2023 12:23 am

Re: Package mra df help

Postby egc » 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.
egc
Site Admin
 
Posts: 201
Joined: Thu May 15, 2003 3:25 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 18 guests