Hi,
I am looking at how a number of parameters affect the survival of 227 individuals,using the multi-state model in RMark. For this I have individual capture/encounter for 8, yearly time steps.
One of the parameters is position in a social queue and if this affects survival. I have added this parameter into the design matrix separately, as a time-varying individual covariate.
However, although this came out in an interation as a top model : S(~stratum * sex + stratum * queue)p(~1)Psi(~fromto) , I have realised after looking at the output and reading 'App 3 individual covariates', that RMark computes the real parameter estimates (of survival) using the mean for all of the individual covariates (position in queue) value at each time-step, and I believe therefore does not take into account each individuals' position in a queue, at each discrete time-step.
To fix this, I thought I needed to use "covariate.predictions" in RMArk using the code below, to get accurate parameter estimates, but this gives me the same output for survival estimates as that generated from the original model.
cov.df=data.frame(rbind(diag(rep(1,7)),diag(rep(0,7))))
names(cov.df)=paste("queue",2003:2009,sep="")
cov.df$index=rep(1:7,2)
S.est=covariate.predictions(results$S.stratumxsex.stratqueue,data=cov.df)
I have also extracted beta estimates from the results but this did not appear to generate results where I can estimate survival for each stratum based on both stratum, sex and queue position...
results$S.stratumxsex.stratqueue$results$beta
results$S.stratumxsex.stratqueue$results$beta.vcv
If anyone has any advice on if this is possible, and if so, how to implement this, I would be very grateful,
Many thanks.