Ages in RMark interface to MARK

This is something that might be obvious to others, but wasn’t to me. If you’re starting individuals out at different ages by using the incredibly useful initial.ages parameter of the process.data function, you should make sure all starting ages are actually represented in your data, or you may have some unintended consequences. This is particularly relevant if you’re bootstrapping your own dataset, as individual bootstrapped datasets may be missing particular starting ages.
If both the levels of the starting age factor and the initial.ages vector contain the missing age, then you won’t get any error messages, but the ages after that will be assigned incorrectly. For example, if age 1 is missing, then age 0 will be assigned age 0, age 2 will be assigned age 1, age 3 will be assigned age 2, etc.
If both the levels of the starting age factor and the initial.ages vector skip the missing age(s), then there seem to be no problems. Here is one way to make sure this is the case:
Hope this helps someone,
Jeff
If both the levels of the starting age factor and the initial.ages vector contain the missing age, then you won’t get any error messages, but the ages after that will be assigned incorrectly. For example, if age 1 is missing, then age 0 will be assigned age 0, age 2 will be assigned age 1, age 3 will be assigned age 2, etc.
If both the levels of the starting age factor and the initial.ages vector skip the missing age(s), then there seem to be no problems. Here is one way to make sure this is the case:
- Code: Select all
bootData1$StartAge=as.factor(as.integer(bootData1$StartAge))
init.ages=as.integer(levels(bootData1$StartAge))
kit.boot.process = process.data(bootData1, model="Burnham", groups=c("Sex", "StartAge"), age.var=2, initial.ages=init.ages)
Hope this helps someone,
Jeff