check.RestrAndConst {elect} | R Documentation |
RestrAndConst
in elect
Function to check the definition of RestrAndConst
in the elect
call.
check.RestrAndConst(x, RestrAndConst, PRINT = FALSE)
x |
Fitted |
RestrAndConst |
Vector which indexes the independent parameters in |
PRINT |
TRUE for printing the comparison |
Function to help defining the parameter constraints in the elect
call\
when the constraint
option is used in msm
.
TRUE when RestrAndConst
is well-defined, FALSE
otherwise.
Ardo van den Hout
# 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)