Differences between RMark and MARK estimates values

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

Differences between RMark and MARK estimates values

Postby Javier Klaich » Thu Nov 29, 2007 12:38 pm

HI!
I´m working with a multistate set of ch (10oc, 2states). In my analysis in MARK the best data supported model was S. pAt pBt PsiAB. PsiBA.
When I ran this model with RMark I found differences in AICc and real parameters estimates between RMark and MARK outputs. This is the code which I used in R:

library(RMark)
ha.2001=convert.inp("D:\\file-rute")
Ha=process.data(ha.2001,model="Multistrata")
Ha.ddl=make.design.data(Ha)
S.dot=list(formula=~1)
p.stratum.time=list(formula=~stratum*time)
Psi.stratum=list(formula=~-1+stratum:tostratum)
Ha.results=mark(Ha,Ha.ddl,model.parameters=list(S=list(formula=~1),p=list(formula=~time*stratum),Psi=list(formula=~-1+stratum:tostratum)))

is this the right code for running S. pAt pBt PsiAB. PsiBA. model???
And if it was. Any idea what`s happening??

Thank you very much!!

Javier

PS: I did RTFM but I was not able to find an answer
Thank you again
Javier Klaich
 
Posts: 5
Joined: Wed Nov 22, 2006 4:07 pm
Location: Puerto Madryn, Patagonia Argentina

Problem solved

Postby jlaake » Fri Nov 30, 2007 2:19 pm

Javier found the discrepancy. I'm posting the questions I asked him and some advice I gave him.

The key point to remember is that RMark simply creates the input file for MARK so as long as you have built the same model, the results have to be the same because it is the same mark.exe program that is fitting the model to the data.

On the surface it looks like what you did was correct. This is a tough
one to answer without seeing the outputs. RMark does use mlogit links
for Psi and I don't think MARK does by default. Did you select mlogit
links in MARK? If not, is MARK converging with a 0 penalty? Did you
fit the model in MARK using a pre-specified model or did you have to
code it with PIMS or design matrix? Were the number of beta's (#design
matrix columns) the same in both models? Which real estimates were
different and by how much? Were all the parameters estimated or were
some singular? RMark assumes the design matrix is full rank and it
should be for that model. Thus the parameter count and AIC could vary
between the runs. Were the likelihood values different between the 2
runs? Did you try running the mstrata example in MARK and RMark so you could see that it works? The mstrata example comes with MARK and with RMark.

A minor point but you could have made your code easier on the last line as follows:
library(RMark)
ha.2001=convert.inp("D:\\file-rute")
Ha=process.data(ha.2001,model="Multistrata")
Ha.ddl=make.design.data(Ha)
S.dot=list(formula=~1)
p.stratum.time=list(formula=~stratum*time)
Psi.stratum=list(formula=~-1+stratum:tostratum)
Ha.results=mark(Ha,Ha.ddl,model.parameters=list
(S=S.dot,p=p.stratum.time,Psi=Psi.stratum))
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests