check.RestrAndConst {elect} | R Documentation |
Checking the definition of RestrAndConst
in elect
Description
Function to check the definition of RestrAndConst
in the elect
call.
Usage
check.RestrAndConst(x, RestrAndConst, PRINT = FALSE)
Arguments
x |
Fitted |
RestrAndConst |
Vector which indexes the independent parameters in |
PRINT |
TRUE for printing the comparison |
Details
Function to help defining the parameter constraints in the elect
call\
when the constraint
option is used in msm
.
Value
TRUE when RestrAndConst
is well-defined, FALSE
otherwise.
Author(s)
Ardo van den Hout
See Also
Examples
# 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)
[Package elect version 1.2 Index]