# NOT RUN {
# Fit model with constraints:
Q <- rbind(c(0,0.01,0.01), c(0,0,0.01), c(0,0,0))
model <- msm(state~age, subject = id, data = electData,
center = FALSE, qmatrix = Q, deathexact = TRUE,
fixedpars = c(7,8), covariates = ~age+x)
RestrAndConst <- c(1:6,0,0,7)
check.RestrAndConst(model, RestrAndConst, PRINT= TRUE)
# Usage: elect(x = model,..., RestrAndConst = RestrAndConst)
# }
Run the code above in your browser using DataLab