Description Usage Arguments Details Value Author(s) See Also Examples
Function to check the definition of RestrAndConst
in the elect
call.
1 | 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
1 2 3 4 5 6 7 8 9 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.