Why does RMARK provide different estimates than MARK?

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

Why does RMARK provide different estimates than MARK?

Postby Bermad » Wed Jan 03, 2018 6:34 pm

Hi all,

I would like to ask which factors may trigger different results using MARK and RMARK. First to note, that I have read the Jeff Laake's comment about it (viewtopic.php?f=21&t=2121). However, I did not unravel why MARK and RMARK gave me different results. Therefore I would like to expose my case and show you the results.

My goal is to assess how well MARK can estimate the demographic parameters basing on the number of captures and recaptures. To do that, I have simulated a capture-recapture history of a population with three status (A, B, and C). In the simulations I only allowed the three following transitions:
A -> B (PsiAB)
B -> C (PsiBC)
C -> B (PsiCB)

So I assessed how well RMARK estimated the next demographic parameters:
pA, pB, pC
PhiA, PhiB, PhiC
PsiAB, PsiBC, PsiBC

To estimate those parameters, I specified that:
A) The recapture probability was constant but different between statuses
Code: Select all
p.dot <- list(formula=~1+stratum)

B) The transition probability was time-varying and different between statuses
Code: Select all
Psi.time=list(formula=~1+time*stratum)

C) The survival probability was time-varying and different between statuses
Code: Select all
Phi.time=list(formula=~1+time*stratum)


I was surprised because instead of the high number of individuals (more than 50 individuals per status and time step) the estimates of PsiBC were highly biased (see image).
Image

However, the rest of the parameters were well estimated (see an example of another transition parameter).
Image

Therefore I was thinking about the potential causes to get such error. First I thought that there were few individuals to estimate the parameter. So I increased the number of adult non-breeders and breeders. However, I kept finding the biased estimates. Second, I thought that I specified the model wrong, but I think that it is correct (time*stratum). Third, I assessed if MARK was the problem. Surprisingly I detected that MARK calculated the parameter PsiCB accurately (see the estimates of PsiBC and PsiCB).
Image
Image

Therefore, according to Jeff Laake’s comment, the differences have to be related with how I specified the model in RMARK. But, I do not know what is wrong:
Code: Select all
model_process <- process.data (input, model="Multistrata",
                                                  time.intervals = rep(1, (nchar(input[1,1])-1)))
model_make=make.design.data(model_process)
# Fix the transitions
model_make$Psi$fix=NA
model_make$Psi$fix[model_make$Psi$A & model_make$Psi$toC] <- 0
model_make$Psi$fix[model_make$Psi$B & model_make$Psi$toA] <- 0
model_make$Psi$fix[model_make$Psi$C & model_make$Psi$toA] <- 0
# Specify parameters
p.dot <- list(formula=~1+stratum)
Psi.time=list(formula=~1+time*stratum)
Phi.time=list(formula=~1+time*stratum)
# Run MARK
model_mark <- mark (model_process, model_make, model.parameters = list(S=Phi.time, p=p.dot, Psi=Psi.time))


Therefore, I would like to ask your help to understand why RMARK did not estimate the parameter PsiCB adequately.
Thanks in advance
Bermad
 
Posts: 7
Joined: Wed Jun 01, 2016 4:19 am

Re: Why does RMARK provide different estimates than MARK?

Postby jlaake » Wed Jan 03, 2018 7:13 pm

First and foremost, RMark does NOT ESTIMATE anything. MARK does ALL of the estimation. RMark is simply an interface that creates an input file for MARK. This is made abundantly clear in all of the RMark documentation and in posting on this forum. Thus, if you are getting differences between MARK interface and the RMark interface it is either because the data, the design matrix or the link functions are different. This is very clearly stated in the sticky post at the beginning of the forum.

With the way you have set this up you are only estimating a single transition probability for each stratum which means you could use the logit link or even the sin link. My guess is that when you use the MARK interface that it is using a different link function than the default for RMark which is the mlogit. You can use link="logit" in the formulas for Psi but first you should compare the MARK output files generated with MARK and RMark interfaces.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Why does RMARK provide different estimates than MARK?

Postby Bermad » Wed Jan 10, 2018 6:35 am

First, thank you very much for your help, and sorry about the expression that I used. I know that RMark merely is an interface.

Regarding my previous question, despite I specified the link= “logit” for all parameters in RMark (as in the MARK interface), I kept having the same wrong results in RMark for the transition parameter C->B.

It would have been strange that the problem would be the link function in the interface of RMark because of the other two transition parameters (PsiAB and PsiBC) were estimated adequately with the same specifications than PsiCB.

Then, as you recommended me, I started to check the differences in the output files generated with MARK and RMark interfaces. I found some differences, but I do not think that those differences may affect the estimation of the parameter PsiCB.

1) Fixed parameters
MARK interface had three fixed parameters
PsiAC=0
PsiBA=0
PsiCA=0
RMark grouped the same three parameters in one fixed parameter
PsiAC=PsiBA=PsiCA=0

2) PIM structure
Code: Select all
        MARK          RMARK
PhiA    1:47          1:47
PhiB    48:94         48:94
PhiC    95:141        95:141
pA      142           142
pB      143           143
pC      144           144
PsiAB   145:191       145:191
PsiAC   192           286
PsiBA   193           286
PsiBC   194:240       192:238
PsiCA   241           286
PsiCB   242:288       239:285


3) Terminology using in the design matrix
Code: Select all
MARK                                          RMark
INPUT ---       blabel(1)=S A:Strata 1;       INPUT ---       blabel(1)=S:(Intercept);
INPUT ---       blabel(2)=S A:Strata 1;       INPUT ---       blabel(2)=S:time2;
INPUT ---       blabel(3)=S A:Strata 1;       INPUT ---       blabel(3)=S:time3;
Other examples with the parameter PsiCB
INPUT ---       rlabel(287)=Psi C to B;       INPUT ---       rlabel(268)=Psi sC toB g1 c1 a29 o30 t30;
INPUT ---       rlabel(288)=Psi C to B;       INPUT ---       rlabel(269)=Psi sC toB g1 c1 a30 o31 t31;



The rest of the output is similar:

MARK
Link Function Used is LOGIT
Variance Estimation Procedure Used is 2ndPart
-2logL(saturated) = 13876.938
Effective Sample Size = 12906
Number of function evaluations was 511 for 288 parameters.
Time for numerical optimization was 5896.56 seconds.

RMark
Link Function Used is LOGIT
Variance Estimation Procedure Used is 2ndPart
-2logL(saturated) = 13876.938
Effective Sample Size = 12906
Number of function evaluations was 354 for 285 parameters.
Time for numerical optimization was 3778.24 seconds.


MARK and RMark
* * WARNING * * Numerical underflow occurred during final processing of this model.
IEEE flag status at final processing of this model:
overflow F
divide by zero F
invalid F
underflow T
inexact T


To sum up, although the PIM is not precisely the same, it should not affect the parameter PsiCB. Moreover, the link function is the same for MARK and RMark.
Could you tell me which could be the parameter that I am introducing wrongly in the RMark interface?
Thanks in advance.
Bermad
 
Posts: 7
Joined: Wed Jun 01, 2016 4:19 am

Re: Why does RMARK provide different estimates than MARK?

Postby jlaake » Wed Jan 24, 2018 9:50 am

We worked on this offlist. There was no discrepancy in results here. A mistake was made by user in manipulating the estimates.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Why does RMARK provide different estimates than MARK?

Postby jlaake » Wed Jan 24, 2018 9:53 am

We worked on this offlist. There was no discrepancy in results here. A mistake was made by user in manipulating the estimates.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: Bing [Bot] and 20 guests

cron