Fit multistate model to panel data in discrete time
pandista.RdMain interface call for setting up the data structures and fitting the parameters
Usage
pandista(
df0,
id = "id",
t = "t",
from = "from",
to = "to",
i.covlist = NULL,
c.covlist = NULL,
time.interaction.var = NULL,
changePointsList = NULL,
basetrans = NULL,
time.as.delta = FALSE,
noFit = FALSE,
LL.method = "cpp",
hessian = TRUE,
opt.method = "optim"
)Arguments
- df0
The original input dataframe
- id
Quoted column name from df0 containing subject ids. Default is id.
- t
Quoted column name from df0 containing the time variable. Default is t.
- from
Quoted column name from df0 containing the "from" state for the event in that row. Default is from.
- to
Quoted column name from df0 containing the "to" state for the event in that row. Default is to.
- i.covlist
A character vector containing quoted column names from df0 for categorical covariates
- c.covlist
A character vector containing quoted column names from df0 for continuous covariates
- time.interaction.var
Character string (optional); Categorical variable with which to interact time. Limited to binary variables for now.
- changePointsList
List of integer vectors to indicted change points for dynamic time constants
- basetrans
A character vector containing base (reference) transition events, each in the form "X->Y"
- time.as.delta
Logical; if TRUE, for each transition, treats time constants past the first one as additive terms. Default is FALSE.
- noFit
Logical; if TRUE, skipping the fitting process and return the model object containing the pre-processed, standardized event data. Default is FALSE.
- LL.method
A string, either "cpp" (default) or "R" indicating which code module should be used to compute the log likelihood
- hessian
A boolean, either TRUE (default) or FALSE, indicating whether the Hessian matrix should be returned
- opt.method
A string, either "optim" (default) or "nlm" indicating which R optimization function should be used to optimize the log likelihood