Title
Usage
lsvcmm.boot(
data,
response,
subject,
time,
vc_covariates = NULL,
nvc_covariates = NULL,
offset = NULL,
weight = NULL,
add_intercept = T,
estimated_time = NULL,
family = DEFAULT_FAMILY_ARGS,
kernel = DEFAULT_KERNEL_ARGS,
penalty = DEFAULT_PENALTY_ARGS,
working_covariance = DEFAULT_WORKING_COVARIANCE_ARGS,
control = DEFAULT_CONTROL_ARGS,
n_samples = 1000,
resample_within_subject = F
)
Arguments
- data
A data frame containing the variables in the model.
- response
The name of the response variable in
data
.- subject
The name of the subject variable in
data
.- time
The name of the time variable in
data
.- vc_covariates
The names of the varying coefficient covariates in
data
.- nvc_covariates
The names of the non-varying coefficient covariates in
data
.- offset
The name of the offset variable in
data
.- weight
The name of the weight variable in
data
.- add_intercept
Whether to add an intercept to the model.
- estimated_time
The time points at which to estimate the varying coefficients. If missing, all observed time points are used.
- family
A list of arguments for the response distribution. See
family_args
.- kernel
A list of arguments for the kernel. See
kernel_args
.- penalty
A list of arguments for the penalty. See
penalty_args
.- working_covariance
A list of arguments for the working covariance. See
working_covariance_args
.- control
A list of arguments for the control parameters. See
control_args
.- n_samples
Number of bootstrap samples to compute
- resample_within_subject
Whether to resample within subjects
Value
A list containing the following elements:
- family
A list of arguments for the response distribution. See
family_args
.- kernel
A list of arguments for the kernel. See
kernel_args
.- penalty
A list of arguments for the penalty. See
penalty_args
.- working_covariance
A list of arguments for the working covariance. See
working_covariance_args
.- control
A list of arguments for the control parameters. See
control_args
.- results
A data frame containing the results of the optimization. Each row is a model resulting from a particular tuning parameter combination.
- nvc_boot
A matrix containing the estimated non-varying coefficient path of dimension (
p_u
,n_samples
).- vc_boot
An array containing the estimated varying coefficient path of dimension (
p_x
,n_timepoints
,n_samples
).- scaled_time
The time points at which the varying coefficients were estimated.
- unscaled_time
The corresponding values in the original scale.
- range_time
The range of the time points.
- full_model
The model fitted on all data.
- nvc
A vector containing the estimated non-varying coefficient.
- vc
An matrix containing the estimated varying coefficient.