Rmark and trap dependence

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

Rmark and trap dependence

Postby Mark Trinder » Wed May 17, 2006 4:35 am

Hi Jeff

firstly, this looks like a fantastic resourse for fitting models to the kind of large datasets I play with (for which direct manipulation of the design matrix would require a cinema screen sized monitor!) - so, thank you very much - and can I just add, this was incredibly well timed for me too :-)

But now for some questions:
- I am unclear about how to progress with trap dependent modelling.
My understanding at this point is that I need to add nyears-1 covariate columns to the ddl matrix meaning for my current analysis with data from 1960 to 2005 I therefore need 45 covariate columns (x1961, x1962...x2005), with '1' in rows corresponding to the year in the label. Ok - I think I can get my head round that, but that sparks two further questions - firstly how, when you have 2 sexes and 3 ages at first ringing; and secondly what format should the ch data be in? I have not found any mention of the need to recode the data using Pradel's trap dependence methods (ie extra rows with removals [-1] apart from the final row) - is this still necessary, or does the multiple covariate coding do away with the need to modify the inp file?

Which leads onto (stick with me, almost done now!) : if the answer to the last question was 'yes, you do still need to modify the ch structure', then am I right in thinking that I will also need to modify the data input method to accomodate a more verbose group structure (male1, male2, male3, female1, etc), rather than the current group factors (sex, age etc).

many thanks

Mark
Mark Trinder
 
Posts: 17
Joined: Tue Oct 28, 2003 7:42 am
Location: Slimbridge, UK

Re: Rmark and trap dependence

Postby cooch » Wed May 17, 2006 6:34 am

Mark Trinder wrote:Hi Jeff

firstly, this looks like a fantastic resourse for fitting models to the kind of large datasets I play with (for which direct manipulation of the design matrix would require a cinema screen sized monitor!) - so, thank you very much - and can I just add, this was incredibly well timed for me too :-)




Jeff and I are working up more complete documentation than is currently available. Probably within the next 2-4 weeks.

I'm sure Jeff will answer this specific question in the nearer term.
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

more Rmark teething problems

Postby Mark Trinder » Thu May 18, 2006 10:53 am

I'm also having trouble (read "can't") fixing transitions in a multistate model - here is my input for fixing a return from B to A to 0 in a 2 state model:

Psi.stratum.fixed=list(formula=~1+stratum:tostratum,fixed=list(tostratum="A",value=0))

and here is the error message when I call 'make.mark.model':

Unrecognized structure for fixed parameters = Error in cat(list(...), file, sep, fill, labels, append) : argument 2 not yet handled by cat

I have tried creating a new bin with 1/0 coding derived from tostratum and using that, but still no joy. Would be useful to know if this is something not yet implemented (as the error msg implies) or simply user error...

Mark
Mark Trinder
 
Posts: 17
Joined: Tue Oct 28, 2003 7:42 am
Location: Slimbridge, UK

Postby jlaake » Thu May 18, 2006 2:14 pm

Mark-

As I have used trap dependence, it is done with time dependent individual covariates. If you have k occasions then you use the first k-1 elements of the capture history as predictors for p2...pk. The only trick is naming the covariates appropriately so they can be used in the formula. This is one of the few limitations in the model formulation. Time dependent covariates must be named xt1,xt2,...xtk where x is the base name (eg could be td for trap dependence) and t1,t2,...tk is the numeric time values which will depend on the begin.time that you use when you set up the models. For example if begin.time=2000 and you have 6 occasions, for your example the covariates would be named td2001,td2002,td2003,td2004,td2005. The value of td2001 is 0/1 capture history value for year 2000. The variables are named based on the time for the parameter they are being used which in this case would be for p of 2001-2005. Once you did this, then you would just use ~td in the formula for p and it will know to construct the model using the variables td2001 to td2005. I think there is a discussion of this in help file for make.mark.model. Evan and I have discussed writing an appendix to help flesh out the material in the help files.

If the covariate is an individual covariate (eg weight, length) then it should be in the data linked to each individual. If the covariate is for groups of animals or for model structure (eg, time - effort, age grouping) then it goes in the design data. If the individual covariate is time dependent then you need a covariate variable for each time that it is used. If some are missing it will use zero, so this could represent average values if you standardized the covariate to have mean 0 but this wouldn't make sense for your example.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Postby jlaake » Thu May 18, 2006 2:24 pm

I didn't follow entire thread before posting.

In regards to the fixed question, the format you used doesn't work. Look at the help file for make.mark.model. It can only fix based on index, age,time,cohort. While I could add the others, for parameters like Psi and others typically they are being fixed to default values like 0 for Psi or 1 for S/Phi and 0 for p. This can be accomplished by deleting the rows in the design data. If the design data for a particular parameter is missing the default behavior is to fix the parameter to the default value.

This is described at the end of the details of the help for make.design.data.
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 1 guest

cron