sim_dlim | R Documentation |
Fit DLIM for simulation
sim_dlim(
data,
df_m,
df_l,
penalize = TRUE,
pen_fn = "ps",
mod_args = NULL,
lag_args = NULL,
fit_dlm = FALSE,
model_type = "standard",
...
)
data |
output from |
df_m |
degrees of freedom for modifiers |
df_l |
degrees of freedom for lags |
penalize |
True to penalize model |
pen_fn |
if penalizing, can specify "ps" for penalized B-splines or "cr" for cubic regression splines with penalties on second derivatives |
mod_args |
a list of additional arguments for the spline function (must be named by argument) |
lag_args |
a list of additional arguments for the spline function (must be named by argument) |
fit_dlm |
True to additionally fit dlm for comparison |
model_type |
"linear" for a DLIM with linear interaction, "quadratic" for a DLIM with quadratic interaction, "standard" for a DLIM with splines |
... |
arguments to pass to model fitting function |
This function returns an object of class "sim_dlim
"
cb |
DLIM cross-basis (class " |
fit |
DLIM model fit (class " |
cb_dlm |
DLM cross-basis (class " |
model_dlm |
DLM model fit (class " |
true_betas |
true linear effect of the exposure on the response for each individual and time point (class " |
modifiers |
|
data |
|
dlim
sim_data
Type vignette('dlimOverview')
for a detailed description.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.