View source: R/helper-functions.R
make_group | R Documentation |
Create grouping for spline design matrix
make_group(.names, penalize_null = TRUE, shared_null = TRUE)
.names |
spline matrix names, always in the format "var_name.baseX". Directly from Construct_Smooth_Data #param null_group A indicator if the null space are in its own group, i.e. if null space are penalized |
penalize_null |
do we penalize the null space, i.e. do we fit the null space into group parameter in bglm group parameter. |
shared_null |
A indicator if the null space have a shared indicator with the penalized space |
A vector of lists, where each element list contains variables that belong to the same group
raw_dat <- sim_Bai(100, 5)$dat %>% data.frame
sm_df <- data.frame(
Var = setdiff(names(raw_dat), "y"),
Func = "s",
Args ="bs='cr', k=5"
)
dsn_mat <- construct_smooth_data(sm_df, raw_dat)$data
make_group(names(dsn_mat))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.