make_group: Create grouping for spline design matrix *[Experimental]*

View source: R/helper-functions.R

make_groupR Documentation

Create grouping for spline design matrix [Experimental]

Description

Create grouping for spline design matrix [Experimental]

Usage

make_group(.names, penalize_null = TRUE, shared_null = TRUE)

Arguments

.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

Value

A vector of lists, where each element list contains variables that belong to the same group

Examples


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))

boyiguo1/BHAM documentation built on Jan. 29, 2024, 10:37 a.m.