Helper function to help set up penalties
Usage
get_penalties(
varnames,
poly,
poly_prefix = "poly_",
int_sep = "\\:",
pool = FALSE,
gamma = 0.5,
cumulative_k = FALSE,
cumulative_poly = TRUE
)
Arguments
- varnames
names of the covariates in the model matrix
- poly
max polynomial considered
- poly_prefix
what comes before the polynomial specification in these varnames?
- int_sep
What denotes the multiplication for interactions?
- pool
Should polynomials and interactions be pooled?
- gamma
How much should the penalty increase with group size (0.5 assumes equal contribution of prior information)
- cumulative_k
Should penalties be increased cumulatively as order interaction increases? (only used if !pool)
- cumulative_poly
Should penalties be increased cumulatively as order polynomial increases? (only used if !pool)