many ages at each marking and extensive aging through study

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

many ages at each marking and extensive aging through study

Postby WiPhi » Wed Feb 15, 2017 5:55 pm

Hello Jeff et al,
This forum and Chapters 7 and 11 in the book have propelled me deep into my analysis but before I bite on the results, I would greatly appreciate a double check on my modelling approach in Rmark.
My data are monthly detection histories (8 per year) of 400+ individually identifiable lions spanning 8 years (64 observations for each lion). The age of lions at marking is estimated to the nearest year based on an established protocol using nose pigmentation and individual lions enter the data at all ages (spanning 0 to 12 years). Five age classes (spanning 2 year intervals up to 8 years of age) tend to capture the meaningful life stages. Consequently, capture histories are diverse, with some lions having entered the data in the first age class and reached the oldest age class by the end of the study and 'marking' of new lions occurring for all age classes in every year of the study.
Survival is thought to be related to age, being low at first, high in middle age classes, than decreasing again in the oldest age class. Survival is also thought to be dependent on gender owing to male harvest, and estimating age and sex specific survival is of primary interest and interactions between sex and age seem likely. Estimating abundance is also of interest, but secondary. There has been a general increase in search effort as the study progressed and hunting was banned midway through the study. It seems reasonable that capture heterogeneity might also exist.
I am interested in the CJSMixture model to estimate survival (with HugHet to estimate N) but I am also curious to explore the use of RD models that might do both (temporary emigration could almost certainly be an issue in this species).
I have fit models defining groups based on sex and age at first detection (in yrs) on import in process.data() then defining the 5 age classes with add.design.data(). I have added a hunting indicator variable to the survival design data based on a conditional statement on the time column to indicate the absence (0) or presence (1) of hunting.
I am interested in exploring other age class groups but my global model for survival is =~-1+ageclass*sex+sex:hunting) which should provide an intercept that is female cub survival, 4 additive terms for the four remaining age classes for females, an additive term for male cubs, 4 additive interaction terms for males in the four remaining age classes and additive term for males in just those years with hunting.
Is treating sex and age as groups for these kinds of questions the most efficient or should they be individual covariates? If sex and age should be modelled as individual covariates, how does the effect of TSM become conditional on the age at marking with my 5 age classes (my initial though is that an ageclass_at_marking*time term might do this?).
I am not certain at all how heterogeneity cold be modelled here with groups. If mixture, ageclass, and sex are potential effecting p, then wouldn’t each group need a group*mixture interaction term? Without such interaction terms (only and additive effect of mixture), is the assumption that the mixture is the same within each age class-sex group?
Thanks in advance!
WiPhi
 
Posts: 27
Joined: Thu Mar 31, 2016 6:15 pm

Re: many ages at each marking and extensive aging through st

Postby jlaake » Wed Feb 15, 2017 6:36 pm

I am interested in exploring other age class groups but my global model for
survival is =~-1+ageclass*sex+sex:hunting) which should provide an
intercept that is female cub survival, 4 additive terms for the four
remaining age classes for females, an additive term for male cubs, 4
additive interaction terms for males in the four remaining age classes and
additive term for males in just those years with hunting.


Why are you using -1 here? use ~ageclass*sex+sex:hunting instead. Second, do they hunt younger animals? If not you should constrain your hunting effect to ages that are hunted. Also sex:hunting should give a hunting:female and hunting:male coefficient. Use model.matrix with the ddl for Phi to see how that works.

Is treating sex and age as groups for these kinds of questions the most
efficient or should they be individual covariates?


Yes. No need to make them individual covariates. See chapter in workshop notes that compares groups vs individual covariates. I assume you are using initial.age in process.data which points to a variable in your groups argument that is in your data with the initial age at first capture. In doing so the age is incremented for that group based on the time intervals you use. You should see that in your design data.


Is treating sex and age as groups for these kinds of questions the most
efficient or should they be individual covariates? If sex and age should be
modelled as individual covariates, how does the effect of TSM become
conditional on the age at marking with my 5 age classes (my initial though
is that an ageclass_at_marking*time term might do this?).

I'm not entirely sure what you are asking here. TSM is simply the time since marking and is not the same thing as age unless all animals enter at the same age.

I am not certain at all how heterogeneity cold be modelled here with
groups. If mixture, ageclass, and sex are potential effecting p, then
wouldn’t each group need a group*mixture interaction term? Without such
interaction terms (only and additive effect of mixture), is the assumption
that the mixture is the same within each age class-sex group?


Your question is a bit jumbled because I think you are referring to several models at once. For the CJSMixture model you can have a sigma for p and Phi and it describes variation among individuals (eg lions) in those parameters. It isn't a mixture model like with RDHet which specifies a set number of mixtures and then estimates a parameter for each mixture ( eg with 2 mixtures, one p might be 0.1 and the other might be 0.5). With CJSMixture it is a continuum rather than discrete sets.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: many ages at each marking and extensive aging through st

Postby WiPhi » Fri Feb 17, 2017 1:28 pm

Thanks for the quick response.

The no intercept was a mistake, holdover from a check on parameters to make sure I understand what was going on.

They do not hunt younger animals. So I think it would be good to examine the effect on just adult males as a candidate model. However, survival is linked among individuals (through mechanisms like infanticide, territorial disputes, etc) which suggests effects of hunting on survival might extend to other age/sex classes not directly hunted.

I see when I use model.matrix that sex:hunting results in two parameters, one for females and one for males. This might be worth exploring for the reasons stated above, but I also want to consider a model with just an effect on adult males (so that the beta's for the age/sex classes are reference a non-hunting state). Is the easiest way to do this to create a single dummy variable in the design data list, coding (1) for adult males in hunting years, and (0) for all other age/sex classes and years?

I did not consider mixtures in Phi per G. Whites page:
http://warnercnr.colostate.edu/~gwhite/ ... models.htm
where he considers heterogeneity in p to be most important.

The differences in how RDhet models and CJSMixture models treat heterogeneity was not clear to me until now. Thanks!
WiPhi
 
Posts: 27
Joined: Thu Mar 31, 2016 6:15 pm

Re: many ages at each marking and extensive aging through st

Postby jlaake » Fri Feb 17, 2017 7:02 pm

Is the easiest way to do this to create a single dummy variable in the design data list, coding (1) for adult males in hunting years, and (0) for all other age/sex classes and years?


Yes. Then use admale:hunting.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: many ages at each marking and extensive aging through st

Postby WiPhi » Tue Feb 21, 2017 6:36 pm

Your question is a bit jumbled because I think you are referring to several models at once. For the CJSMixture model you can have a sigma for p and Phi and it describes variation among individuals (eg lions) in those parameters. It isn't a mixture model like with RDHet which specifies a set number of mixtures and then estimates a parameter for each mixture ( eg with 2 mixtures, one p might be 0.1 and the other might be 0.5). With CJSMixture it is a continuum rather than discrete sets.



Hi Jeff, just looking at the model output, I am having trouble seeing how the the continuum is implemented with CJSMixture. Per G. White's page:
http://warnercnr.colostate.edu/~gwhite/ ... models.htm
it would seem the mixtures are modeled as discrete sets with 2 as the default number of mixtures as I also see in my results when fitting a CJSMixture model (this example is with only two age classes)

Code: Select all
Phi.cjs.age2=list(formula=~-1+ageclass2:sex)
p.cjs.mixyear=list(formula=~mixture+studyyear,share=T)

cjs.model<-make.mark.model(parameters=list(Phi=Phi.cjs.age2,p=p.cjs.mixyear),data=lions.process.cjs,ddl=lions.ddl.cjs)

cjs.model.results<-run.mark.model(cjs.model)

cjs.model.results$results$real


                           estimate        se        lcl        ucl
pi:(Intercept)            0.1235019 0.1602839 -0.1906546  0.4376585
Phi:ageclass2[0,2):sex0   1.0427037 0.2079495  0.6351227  1.4502847
Phi:ageclass2[2,22]:sex0  2.0488192 0.1505312  1.7537779  2.3438604
Phi:ageclass2[0,2):sex1   1.1759602 0.2554327  0.6753122  1.6766082
Phi:ageclass2[2,22]:sex1  0.8295421 0.1538104  0.5280737  1.1310104
p:(Intercept)            -0.3019447 0.2602585 -0.8120513  0.2081619
p:mixture2               -2.1232776 0.0933478 -2.3062393 -1.9403159
p:studyyear(2009,2010]    0.8685608 0.2850581  0.3098470  1.4272746
p:studyyear(2010,2011]    0.8763947 0.2896996  0.3085834  1.4442060
p:studyyear(2011,2012]    0.9701450 0.2956332  0.3907039  1.5495862
p:studyyear(2012,2013]    0.4415731 0.2984682 -0.1434246  1.0265708
p:studyyear(2013,2014]    1.7663381 0.2905125  1.1969337  2.3357425
p:studyyear(2014,2015]    2.1984910 0.2890350  1.6319823  2.7649997
p:studyyear(2015,2016]    1.8317504 0.2883613  1.2665623  2.3969386
WiPhi
 
Posts: 27
Joined: Thu Mar 31, 2016 6:15 pm

Re: many ages at each marking and extensive aging through st

Postby jlaake » Tue Feb 21, 2017 7:27 pm

My apologies. I was thinking of CJSRandom. I didn't realize that there was also a CJSMixture which appears to be a classic mixture approach.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: many ages at each marking and extensive aging through st

Postby cooch » Tue Feb 21, 2017 7:49 pm

jlaake wrote:My apologies. I was thinking of CJSRandom. I didn't realize that there was also a CJSMixture which appears to be a classic mixture approach.


Indeed -- worth a look at the Addendum to Chapter 14, where all these 'heterogeneoty' models are tabulated (I put the information there, since Chapter 14 -- the 'closed population abundance estimation chapter' is the first place mixture and individual RE models are described. Perhaps not ideal, but...)

http://www.phidot.org/software/mark/doc ... df#page=53
cooch
 
Posts: 1628
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: many ages at each marking and extensive aging through st

Postby WiPhi » Tue Feb 21, 2017 8:04 pm

Just caught that myself after seeing Olivier's Rpub (which I hope he might continue to add to :D ):
https://rpubs.com/ogimenez/201392
WiPhi
 
Posts: 27
Joined: Thu Mar 31, 2016 6:15 pm

Re: many ages at each marking and extensive aging through st

Postby WiPhi » Thu Feb 23, 2017 12:28 pm

I just wanted to return to one of my original questions: when modelling heterogeneity in p using Pledger mixtures (as in CJSMixture), is it true that a mixture*group interaction for each group must be specified in the detection model otherwise the assumption is that mixture is the same within each group? In my case, sex is a grouping variable and it is logical that gender affects p but it is also seems logical that within each gender there may be heterogeneity. It would seem that in mixture models, group*mixture effects would be the default assumption (otherwise, why define groups if we don't think they effect a parameter).
WiPhi
 
Posts: 27
Joined: Thu Mar 31, 2016 6:15 pm

Re: many ages at each marking and extensive aging through st

Postby jlaake » Thu Feb 23, 2017 12:55 pm

I'm not sure what you are looking for here. Variables defined for groups are factor variables that define subsets of the data. Those variables can be used for any part of the model including detection. While ~group*mixture may be valid for detection, so might ~group or ~mixture or even group+mixture depending on the situation. Just because you define a variable doesn't mean that you have to use it in the final model. It may be that you only have one group variable, say sex, and sex might affect survival in CJSMixture but not detection. Groups can also be used for defining subsets for abundance estimation. --jeff
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Next

Return to RMark

Who is online

Users browsing this forum: No registered users and 10 guests