missing models when imported into MARK

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

missing models when imported into MARK

Postby amandarg » Tue Oct 11, 2011 9:43 am

Hi, I am using RMark for running closed capture models with full heterogeneity. They run fine but when I try to import them into MARK, my model for p(mixture+group+c) is missing. I have run this model as a stand alone and it is fine. Any ideas of what is going on?

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

#inport .inp
bentsp11=convert.inp("C:/r_closed/inp/bents_spring2011.inp",
group.df=data.frame(sex=c("Male", "Female")))

bentsp11.proc = process.data(bentsp11, model = "FullHet", groups = "sex")

bentsp11.ddl = make.design.data(bentsp11.proc)

bentsp11.analysis=function()
{

#Create parameter specifications for formulas

#+c, share=true means that the recapture (c) will look like p but not be the exact same (will be equivalent of an m(b)).
#m(b)
p.dot=list(formula=~1+c,share=TRUE)
#m(b*g)
p.group=list(formula=~group+c,share=TRUE)

#mixture+c means that there are 2 mixtures (pi will be one half and 1-pi equals other half) and m(b) between p and c, so p does not equal c).
#m(bh)
p.mixture=list(formula=~mixture+c,share=TRUE)
#m(bh+g)
p.mixture.group.c=list(formula=~group+mixture+c,share=TRUE)
#m(t)
p.time=list(formula=~time,share=TRUE)
#m(t*g)
p.time.group=list(formula=~time*group,share=TRUE)
#m(t+g)
p.timeplusgroup=list(formula=~time+group,share=TRUE)

#m(.)
p.dot.c=list(formula=~1,share=TRUE)
#m(g)
p.group.c=list(formula=~group,share=TRUE)
#m(h)
p.mixture.c=list(formula=~mixture,share=TRUE)
#m(g+h)
p.mixture.group.c=list(formula=~group+mixture,share=TRUE)
#m(th)
p.timemixture.c=list(formula=~time+mixture,share=TRUE)
#m(th+g)
p.timemixturegroup.c=list(formula=~group+time+mixture,share=TRUE)
#m(bth)
p.mixture.time.behavior=list(formula=~time+mixture+c,share=TRUE)

pi.dot=list(formula=~1)
pi.group=list(formula=~group)
#no heterogeneity
pi.none=list(formula=~1, fixed=1)


N.dot=list(formula=~1)
N.group=list(formula=~group)

cml=create.model.list("FullHet")

results = mark.wrapper(cml, data=bentsp11.proc,ddl=bentsp11.ddl, output=FALSE)
return(results)
}

dummy=capture.output(bentsp11.results<-bentsp11.analysis())

summary(bentsp11.results)

bentsp11.results.table=bentsp11.results$model.table

export.MARK(bentsp11.proc, project.name="Bentsp11", bentsp11.results,
replace=TRUE)




Thanks,
Amanda
amandarg
 
Posts: 24
Joined: Sun Nov 07, 2010 4:27 pm

Re: missing models when imported into MARK

Postby jlaake » Tue Oct 11, 2011 3:02 pm

It looks to me that you used the same formula name for 2 different formulas.

p.mixture.group.c=list(formula=~group+mixture+c,share=TRUE)
p.mixture.group.c=list(formula=~group+mixture,share=TRUE)

The second one would have over-written the first. Change the names so they are unique and it should work just fine.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: missing models when imported into MARK

Postby amandarg » Wed Oct 12, 2011 9:12 am

Thanks so much. I should have caught that.

Amanda
amandarg
 
Posts: 24
Joined: Sun Nov 07, 2010 4:27 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests