Age classes and time interaction

Hi, I'm trying to run some CJS models in marked to look at apparent survival in a bird population. The population has ~190 nest boxes where we band only juveniles at fledgling stage at every breeding season.
I ran some models in Program MARK and it seems like we have a 5 age classes structure. I am now trying to run the models in marked for reproducibility:
Here is the code I used to create 5 age classes in the design matrix:
And then I created the 6 age classes for detection p:
Is this the correct way of defining age-specific classes for Phi and p?
And then I run the CJS models:
1. Now I want to create a more "complex" age structure by regrouping age classes. Juveniles = 0 to 1 / adults = 2-4 / older adults = 5+. I want to test the hypothesis that only juvenile survival fluctuates in time and adults have different survival but stable (constant in time). How should I proceed?
2. For the detection (p), I know there is a monitoring issue from 2017. How can I make detection age-dependent but different between before and after 2017?
Thanks for your advice
Adrien
I ran some models in Program MARK and it seems like we have a 5 age classes structure. I am now trying to run the models in marked for reproducibility:
Here is the code I used to create 5 age classes in the design matrix:
- Code: Select all
ddl <- make.design.data(cjs_proc, parameters = list(Phi = list(age.bins = c(0, 1, 2, 3, 4, Inf))), right = FALSE)
levels(ddl$Phi$age) <- c("1","2","3","4","5+")
And then I created the 6 age classes for detection p:
- Code: Select all
new_age_categories <- cut(age_levels_numeric, breaks = c(0, 1, 2, 3, 4, 5, Inf), labels = c("1", "2", "3", "4", "5", "6+"), right = FALSE)
levels(ddl$p$age) <- new_age_categories
Is this the correct way of defining age-specific classes for Phi and p?
And then I run the CJS models:
- Code: Select all
cjs_model <- mark(cjs_proc, ddl, model.parameters = list(
Phi = list(formula=~time:age),
p = list(formula=~time:age)
), output = FALSE)
1. Now I want to create a more "complex" age structure by regrouping age classes. Juveniles = 0 to 1 / adults = 2-4 / older adults = 5+. I want to test the hypothesis that only juvenile survival fluctuates in time and adults have different survival but stable (constant in time). How should I proceed?
2. For the detection (p), I know there is a monitoring issue from 2017. How can I make detection age-dependent but different between before and after 2017?
Thanks for your advice
Adrien