| relax.islasso | R Documentation |
Fits a relaxed islasso model by unpenalizing a subset of variables
selected either by statistical significance or by explicit user specification.
relax.islasso(fit, id = NULL, pval = 0.05, ...)
fit |
An object of class |
id |
Optional. Either:
If not provided, selection is based on the significance level given in |
pval |
Significance threshold (default |
... |
Further arguments passed to |
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.
An object of class islasso, representing the updated relaxed model.
## Not run:
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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.