This internal function fits a model for each covariate using the observed data.
pred_fun_cov(
covparams,
covnames,
covtypes,
covfits_custom,
restrictions,
time_name,
obs_data,
model_fits
)
A list of fitted models, one for each covariate in covnames
.
List of vectors, where each vector contains information for
one parameter used in the modeling of the time-varying covariates (e.g.,
model statement, family, link function, etc.). Each vector
must be the same length as covnames
and in the same order.
Vector of character strings specifying the names of the time-varying covariates in obs_data
.
Vector of character strings specifying the "type" of each time-varying covariate included in covnames
. The possible "types" are: "binary"
, "normal"
, "categorical"
, "bounded normal"
, "zero-inflated normal"
, "truncated normal"
, "absorbing"
, "categorical time"
, and "custom"
.
Vector containing custom fit functions for time-varying covariates that
do not fall within the pre-defined covariate types. It should be in
the same order covnames
. If a custom fit function is not
required for a particular covariate (e.g., if the first
covariate is of type "binary"
but the second is of type "custom"
), then that
index should be set to NA
.
List of vectors. Each vector contains as its first entry a covariate for which
a priori knowledge of its distribution is available; its second entry a condition
under which no knowledge of its distribution is available and that must be TRUE
for the distribution of that covariate given that condition to be estimated via a parametric
model or other fitting procedure; its third entry a function for estimating the distribution
of that covariate given the condition in the second entry is false such that a priori knowledge
of the covariate distribution is available; and its fourth entry a value used by the function in the
third entry. The default is NA
.
Character string specifying the name of the time variable in obs_data
.
Data on which the models are fit.
Logical scalar indicating whether to return the fitted models. The default is FALSE
.