exporting models using function export.MARK

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

exporting models using function export.MARK

Postby tommyg » Thu Mar 10, 2011 12:52 pm

Hi,

I have what should be a beginner's question, but haven't been able to find the correct solution. I've been using the export.MARK function in addition with the collect.models function to export my models to MARK (eventually I need to estimate the overdispersion parameter using the median c hat approach). In MARK, I then go to Files > RMark Import > .... When I do this, MARK always uses the unadjusted parameters to calculated AICs, but I would prefer it to use the actual number of parameters in the model and rather than adjust downward for identifiability, singularity etc.. This seems simple enough to do in some functions in RMark, but I haven't had success exporting models with the number of parameters that I would prefer to use when doing model comparison.

Thanks.

Tommy
tommyg
 
Posts: 21
Joined: Tue Mar 01, 2011 1:55 pm

Re: exporting models using function export.MARK

Postby jlaake » Thu Mar 10, 2011 1:23 pm

You'll need to use the Adustment menu item in the MARK interface to adjust the number of parameters for each model. The import facility doesn't have a capability to do this automatically. Presumably if you are doing this for median chat then you only need to adjust parameters for one model.

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

Re: exporting models using function export.MARK

Postby timkdavies » Wed Aug 01, 2012 1:41 pm

Hi Jeff,

I am having problems converting my data in RMark to an .inp file I can use in MARK.

The code I have been using is below:

Code: Select all
Alldata.proc=process.data(Alldata,model="HugFullHet",
               mixtures=2, groups=c("species","sex","age","habitat","site")
               )

export.chdata(Alldata.proc,"Alldata",covariates="weight")

# Convert.inp and store in another object named Alldata2
Alldata2=convert.inp("Alldata",
   group.df=data.frame(species=c("AS","CG","MA"),sex=c("Female","Male"),age=c("A","JUV","SA"),
            covariates="weight",habitat=c("broad","clearfell","grassland","heather","larch","pine"),
            site=c("one","three","two"))
)


The error message is

Error in convert.inp("Alldata", group.df = data.frame(species = c("AS", :

Number of columns in data file does not match group/covariate specification
>
My data in the txt file and when loaded into RMark is in columns - ch, species, sex, age, weight, habitat, site. Have I specified the factors and covariates incorrectly?

Any help greatly appreciated!
Cheers
timkdavies
 
Posts: 13
Joined: Wed May 20, 2009 11:24 am
Location: Silwood, UK

Re: exporting models using function export.MARK

Postby timkdavies » Wed Aug 01, 2012 1:50 pm

Sorry this is the code tweaked from looking at the workshop notes

Code: Select all
Alldata.proc=process.data(Alldata,model="HugFullHet",
               groups="species","sex","age","habitat","site")
               
export.chdata(Alldata.proc,"Alldata",covariates="weight")

# Convert.inp and store in another object named Alldata2
Alldata2=convert.inp("Alldata",
   group.df=data.frame(species=c("AS","CG","MA"),sex=c("Female","Male"),age=c("A","JUV","SA"),
            covariates="weight",habitat=c("broad","clearfell","grassland","heather","larch","pine"),
            site=c("one","three","two"))
)


I still get the same error however...
timkdavies
 
Posts: 13
Joined: Wed May 20, 2009 11:24 am
Location: Silwood, UK


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest