
Relaxed islasso model fitting
relax.islasso.RdFits a relaxed islasso model by unpenalizing a subset of variables
selected either by statistical significance or by explicit user specification.
Arguments
- fit
An object of class
islasso, representing a fitted model.- id
Optional. Either:
A numeric vector of indices referring to variables to be kept unpenalized, or
A character vector of variable names to be kept unpenalized.
If not provided, selection is based on the significance level given in
alpha.- pval
Significance threshold (default
0.05). Variables with p-values less than or equal topvalare selected ifidis missing.- ...
Further arguments passed to
update.
Details
The function creates a new islasso model where the selected variables
are excluded from penalization. Selection can be made either through
explicit variable indices/names via id, or automatically
by thresholding p-values using alpha.
Examples
if (FALSE) { # \dontrun{
fit <- islasso(y ~ x1 + x2 + x3, data = dat)
# Relaxed model keeping only variables with p <= 0.01
fit_relaxed <- relax.islasso(fit, alpha = 0.01)
# Relaxed model keeping variable "x1" unpenalized
fit_relaxed2 <- relax.islasso(fit, id = "x1")
} # }