Page 1 of 1

Robust - RMARK diff estimate of survival from MARK

PostPosted: Wed Nov 09, 2011 2:58 pm
by amandarg
Sorry, hopefully this is the last problem I will be having with this model. I ran all my models and noticed that my estimates of apparent survival (which is what I am ultimately interested in) were sometimes very different then when I was putting them into MARK by hand using design matrices. I did this because one of my estimates in RMARK (the last one for S) seemed way too high based on my capture history but it about what I expected in MARK. The two design matrices are similar and I had Brett Sandercock look at them as well so make sure I didn't just make a mistake. Neither of us are quite sure what is going on and which estimates I should be using. I made copies of the DM from both programs that I can send that should be modeling the same thing. I'm also attaching the code I ran just for one of the models that I checked. I wanted to run the model: S(time) pi(session) m(bh) t(session)

Code: Select all
#RMark analysis
#Load RMark package
library(RMark);
rm(list=ls())
cleanup(ask=FALSE)

#inport .inp
bentsadults=convert.inp("C:/R_robust/inpfiles/bentsfixed_final.inp",
group.df=data.frame(sex=c("Male", "Female")))

#Process the data so models can be analyzed
#Time intervals for 6 primary occasions (300+ collectors)
#use the format from MARK where you put in the x/60 for time intervals
time=c(0,0,0,0,0,0,.733,0,0,0,0,4.25,0,0,0,0,0,0,0,0,0,0,0,0,1.47,0,0,0,0,0,0,0,0,0,0,0,0,0,4.47,0,0,0,0,0,0,0,0,0,0,0,0,.9,0,0,0,0,0,0,0,0,0,0,0,0,0)
bentsadults.proc=process.data(bentsadults,model="RDFullHet",time.intervals=time,
groups="sex")
summary(bentsadults.proc)

bentsadults.robust.run=function()
{

#Create the design data
bentsadults.ddl=make.design.data(bentsadults.proc)

#Create parameter specifications for formulas

S.time=list(formula=~time)

# "No Emigration" - set Gamma'' = Gamma' = zero
GammaDoublePrime.GammaPrime.nomove=list(GammaDoublePrime=list(formula=~1,fixed=0,share=TRUE))
GammaDoublePrime.GammaPrime.nomove=list(GammaDoublePrime=list(formula=~1,fixed=0), GammaPrime=list(formula=~1,fixed=0))

#m(bh) diff each primary period
p.mixturesession=list(formula=~session:mixture+c,share=TRUE)

pi.session=list(formula=~session)


N.session=list(formula=~session)

# create model list
cml=create.model.list("RDFullHet")
#row.names(cml)=c(1:length(cml$p))

# run and return models
results=mark.wrapper(cml,data=bentsadults.proc,ddl=bentsadults.ddl,adjust=TRUE)
return(results)
}

robust.results=bentsadults.robust.run()
robust.results

results.table=robust.results$model.table

export.MARK(bentsadults.proc, project.name="bentsrobustf", robust.results,
replace=TRUE)






Re: Robust - RMARK diff estimate of survival from MARK

PostPosted: Wed Nov 09, 2011 3:47 pm
by jlaake
I'm not entirely sure what you were saying in your message other than that you are getting differences between what you got in MARK and RMark. There are at least 4 reasons for differences assuming you did everything in MARK correctly:
1) different data
2) different model
3) different link functions
4) different DM for the same model

The last 2 typicallu only make small differences. From looking at what you show, my guess would be different model. You have used groups="sex" but then your model for N only includes session. To me that seems strange that you wouldn't expect differences in abundance across sex. Note that the model for N is actually for f0 so even if abundance is the same, f0 can differ if one sex is more likely to be caught than the other. I would start with looking for differences in the models that you created with MARK and RMark.