I'm new to RMark (but know both R an MARK well) and I'm working with a student analyzing a data set where most birds are marked as chicks. We want a model with a different Phi for the first year of life, but the same Phi thereafter (i.e., age has two levels, 'juv' and 'adult'). There should be plenty of information in the data to fit a Phi(time*age) model except that Phi for 'adult' in the first year is not estimable (there is only one 'adult' individual released in the first year). We can fix the real parameter for this Phi, but we still get one redundant beta parameter in the model matrix.
If I remember correctly MARK does not object to having a row of all zeros in the model matrix, so the way I would do this in MARK is to construct a model matrix like this
1:1997:juv: 1 0 0 0 0
2:1998:juv: 1 1 0 0 0
3:1999:juv: 1 0 1 0 0
4:1997:adult: 0 0 0 0 0
5:1998:adult: 1 1 0 1 0
6:1999:adult: 1 0 1 1 1
...and then fix real parameter 4 (I guess one can put whatever values in row 4, but the point is that I have 5 columns whereas the equivalent model matrix in RMark has 6 columns).
What is the best way to do the equivalent in RMark?
If it helps to answer, here is some code to base it on:
GLOB.proc = process.data(GLOB, model="CJS", group="age.class", begin.time=1997, age.var=1, initial.age=c(1,1,2,4,4))
GLOB.ddl = make.design.data(GLOB.proc, parameters=list(Phi=list(age.bins=c(1,2,18)), p=list(age.bins=c(2,3,4,19))), right=FALSE)
levels(GLOB.ddl$Phi$age)=c("1K","2Kpluss")
levels(GLOB.ddl$p$age)=c("2K","3K","4Kpluss")
phis.to.fix = GLOB.ddl$Phi$par.index[GLOB.ddl$Phi$time == 1997 & GLOB.ddl$Phi$age=="2Kpluss"]
time.age.int = list(formula= ~time*age, fixed=list(index=phis.to.fix, value=0), link="loglog")
td.time.age=list(formula=~td + time + age)
fit = mark(GLOB.proc, GLOB.ddl, model.parameters = list(Phi=time.age.int, p=td.time.age))
Best regards,
Torbjørn Ergon