All release ages known
We consider a special case of this, with design as follows:
Animals can be assigned at capture to age classes:
A natal (first- year) class
One or more "adult" classes
Animals that are in the last adult age class remain in that class at subsequent recapture occasions after release
Animals in the natal or earlier adults classes transition to the next age class at the next capture (recapture) occasion
Animals are released in every identifiable age class each capture occasion, with potential recaptures from every release cohort in subsequent recapture occasions
In the most common application of this design, we have a birth/hatching-year class, followed by an adult class, with transition to "adult" after 1 capture occasion; animals originally classed as adults remain in the adult class for the remainder of the study. Under this design the basic parameter structure is:
"Adult" class animals follow the ordinary CJS model, possibly involving time effects on Phi and or p
"Juvenile" class animals have a different survival in their year following release and thereafter survive according to the "adult" survival assumptions.
Ordinarily recapture p is not modeled as age-specific under this design, because by their first recapture period animals released as 'young' are now 'adults'
We apply this design to male Serins, a finch inhabiting northeastern Spain. Actually, this is a slightly variant, in that because sex of hatching-year (HY) Serins cannot reliably be determined, the HY class is skipped and we start with the second-year (SY) classes. The 2 age classes are then SY ("young") and ASY ("adult").
RMark scripting approach
The data are already formatted in an RMark dataframe object here; save it to your working directory and load it:
> require(RMark)
> #data_dir<-"C:/Documents and Settings/conroy/My Documents/Dropbox/teaching/WILD8390/spring2014/CJS")
> data_dir<-"C:/users/mike/Dropbox/teaching/software course/5"
> setwd(data_dir)
>
> #################
> ##load in data
> load("serin.males")
We then need to process the data as before to CJS model format and create the design data, which we will need to modify
> serins.processed=process.data(serin.males,model="CJS",begin.time=1990,groups=c("age"))
> serins.ddl=make.design.data(serins.processed)
Similar to the cohort example, we need to keep track of actual 'age'. In this (simplified) design, there are only 2 categories and we can describe them with 0 (young) and 1 (adult) without having to necessarily create a factor variable. We call our new design variable age.now
> #create a age.now variable. This is 0 if HY bird and 1 if AHY at current occasion
> #e.g., if a bird was captured as 0 in 1990 it transitions to 1 in 1991 and stays 1
> # if it is 1 in 1991 it stays 1 (nothing happens)
> #note this is done only for Phi by definition first recapture always occurs as 'adult' so p is not age-specific
>
As before, we create a series of model formulas that will come in handy below.
#parameter formulas. Include age.now as age variable in all the relevant formulas
Phi.age=list(formula=~age.now)
Phi.dot=list(formula=~1)
Phi.t=list(formula=~time)
Phi.age.t=list(formula=~age.now+time)
Phi.age.T=list(formula=~age.now*time)
#p not age specific because first recapture occurs when adults!
p.dot=list(formula=~1)
p.t=list(formula=~time)
Finally, we create our first age- (but for now now time-) specific model
> Phi.age.p.dot=mark(serins.processed,serins.ddl,model.parameters=list(Phi=Phi.age,p=p.dot))
Check out the PIMS for this model.
> PIMS(Phi.age.p.dot,"Phi")
group = ageA
1990 1991 1992 1993 1994 1995 1996 1997 1998
1990 1 1 1 1 1 1 1 1 1
1991 1 1 1 1 1 1 1 1
1992 1 1 1 1 1 1 1
1993 1 1 1 1 1 1
1994 1 1 1 1 1
1995 1 1 1 1
1996 1 1 1
1997 1 1
1998 1
group = ageY
1990 1991 1992 1993 1994 1995 1996 1997 1998
1990 2 1 1 1 1 1 1 1 1
1991 2 1 1 1 1 1 1 1
1992 2 1 1 1 1 1 1
1993 2 1 1 1 1 1
1994 2 1 1 1 1
1995 2 1 1 1
1996 2 1 1
1997 2 1
1998 2
This confirms that (1) survival is different the first year after release of young birds, and (2) constant thereafter. The next (simpler) model is one in which we get rid of the age distinction
> Phi.dot.p.dot=mark(serins.processed,serins.ddl,model.parameters=list(Phi=Phi.dot,p=p.dot))
Examination of the PIM matrix reveals an identical structure to the previous model except there is no 2 index for young survival.
We can make survival time (but not age) specific by
Phi.t.p.dot=mark(serins.processed,serins.ddl,model.parameters=list(Phi=Phi.t,p=p.dot))
> PIMS(Phi.t.p.dot,"Phi")
group = ageA
1990 1991 1992 1993 1994 1995 1996 1997 1998
1990 1 2 3 4 5 6 7 8 9
1991 2 3 4 5 6 7 8 9
1992 3 4 5 6 7 8 9
1993 4 5 6 7 8 9
1994 5 6 7 8 9
1995 6 7 8 9
1996 7 8 9
1997 8 9
1998 9
group = ageY
1990 1991 1992 1993 1994 1995 1996 1997 1998
1990 1 2 3 4 5 6 7 8 9
1991 2 3 4 5 6 7 8 9
1992 3 4 5 6 7 8 9
1993 4 5 6 7 8 9
1994 5 6 7 8 9
1995 6 7 8 9
1996 7 8 9
1997 8 9
1998 9
This is just ordinary CJS Phi(t) with no group effect.
We can create an age- and time-specific model by:
> Phi.age.t.p.dot=mark(serins.processed,serins.ddl,model.parameters=list(Phi=Phi.age.t,p=p.dot))
The PIM for Phi for this model shows meets our criteria:
Adults time specific survival
Young different first year survival (and different for each release of young, so allowing for time-specific differences in first-year survival)
Young survive like adults after first year.
> PIMS(Phi.age.t.p.dot,"Phi")
group = ageA
1990 1991 1992 1993 1994 1995 1996 1997 1998
1990 1 2 3 4 5 6 7 8 9
1991 2 3 4 5 6 7 8 9
1992 3 4 5 6 7 8 9
1993 4 5 6 7 8 9
1994 5 6 7 8 9
1995 6 7 8 9
1996 7 8 9
1997 8 9
1998 9
group = ageY
1990 1991 1992 1993 1994 1995 1996 1997 1998
1990 10 2 3 4 5 6 7 8 9
1991 11 3 4 5 6 7 8 9
1992 12 4 5 6 7 8 9
1993 13 5 6 7 8 9
1994 14 6 7 8 9
1995 15 7 8 9
1996 16 8 9
1997 17 9
1998 18
Notice by the way that p never involves age effects under this design. The reason is that by the first recapture period young are now adults-- and presumably are captured at the same rate.
Note too that age and time under this model are additive effects, so the design matrix will be have fewer columns than rows (number of PIM parameters)
> dim(Phi.age.t.p.dot$design.matrix)
[1] 19 11
By contrast the Phi(age*t) model, which has the same PIM structure, has 19 DM columns
> Phi.age.T.p.dot=mark(serins.processed,serins.ddl,model.parameters=list(Phi=Phi.age.T,p=p.dot))
> dim(Phi.age.T.p.dot$design.matrix)
[1] 19 19
The above were all p(.) models; we can repeat the sequence for p(t) models, creating 10 altogether. Script to run all 10 models and create a summary AIC table is here. The code also performed model averaging on the Phi real parameter values, and produces a graph of adult and juvenile survival over time with model-averaged confidence intervals, and produces and *.inp file formatted for reading into MARK.
MARK GUI
Here we describe the analysis within the MARK GUI for the Serin data. Again, the data are formatted in MARK *.inp format here and read into MARK in CJS form with the ages at release as the groups. Again, we're going to bypass this step here and refer you to the MARK results files that have been saved here (download, extract, and open in MARK as before). As with the cohort models, we can create models that don't involve age by standard PIM or built in model approaches, but be careful not to create any "group" models (g, g*t, etc.) since these will have no meaning (animals change 'groups' as they age!).
Under this design, age-specific models are fairly easy to create using some tools in MARK. To illustrate, retrieve a Phi(t) model and open the PIM matrices for adults and young. Then go to the young matrix, right click "diagonal', and keep the default options (modify first diagonal, starting at 10, do not check 'all same' box). The resulting PIM looks like this:
You can save an run this (with either p(t) or p(.)) ; this is a Phi(age*t) model. This model is modified by a design matrix that eliminates the age*t interaction columns to create a Phi(age+t) model
We proceed before with model comparison, selection, and model averaging. Note again that the table AIC values and ranking may differ for some models because of parameter counting, but you can confirm that the results are the same (same estimate values, deviance, etc.).
Next: Other situations