I am fitting multistate models to estimate sex-specific survival. The three defined states (stratum): M, F, and U.

I have successfully fitted a series of models to estimate sex-specific survival with and without a time trend. I would like though to fit a model with a time trend on female survival (F), a constant male survival (M) and either constant or a time trend for the unknown state animals (U).

Process data and design data:

- Code: Select all
`#Process data`

sexMS.processed=process.data(markdataMS,model="Multistrata",begin.time=1989)

#Create the design data

sexMS.ddl=make.design.data(sexMS.processed,parameters=list(Psi=list(pim.type="time")))

#add design data to allow survival probabilities to be M=F<>U, M=U<>F,F=U<>M

- Code: Select all
`sexMS.ddl$S$SFM="FM"`

sexMS.ddl$S$SFM[sexMS.ddl$S$stratum=="U"]="SU"

sexMS.ddl$S$SFU="FU"

sexMS.ddl$S$SFU[sexMS.ddl$S$stratum=="M"]="SM"

sexMS.ddl$S$SMU="MU"

sexMS.ddl$S$SMU[sexMS.ddl$S$stratum=="F"]="SF"

Define survival parameters to run models

- Code: Select all
`#Time trend for each state (sex)`

S.sexTime=list(formula=~Time:stratum)

#Time trend for F and M+U (together as one parameter)

S.MUTimeb=list(formula=~Time:SMU)

I wonder whether I need to modify the design matrix for S before I can define the model parameters? Any tips on how to specify the survival parameter would be much appreciated. I just haven't been able to see any examples.

Many thanks,

Monica