tramvs {tramvs} | R Documentation |
Select optimal subset based on high dimensional BIC
Description
Select optimal subset based on high dimensional BIC
Usage
tramvs(
formula,
data,
modFUN,
mandatory = NULL,
supp_max = NULL,
k_max = NULL,
thresh = NULL,
init = TRUE,
m_max = 10,
m0 = NULL,
verbose = TRUE,
...
)
Arguments
formula |
object of class |
data |
data frame containing the variables in the model. |
modFUN |
function for fitting a transformation model, e.g., |
mandatory |
formula of mandatory covariates, which will always be included
and estimated in the model. Note that this also changes the intialization
of the active set. The active set is then computed with regards to the
model residuals of |
supp_max |
maximum support which to call |
k_max |
maximum support size to consider during the splicing algorithm.
Defaults to |
thresh |
threshold when to stop splicing. Defaults to
0.01 * |
init |
initialize active set. Defaults to |
m_max |
maximum number of iterating the splicing algorithm. |
m0 |
Transformation model for initialization |
verbose |
show progress bar (default: |
... |
additional arguments supplied to |
Details
L0-penalized (i.e., best subset selection) transformation models using the abess algorithm.
Value
object of class "tramvs"
, containing the regularization path
(information criterion SIC
and coefficients coefs
), the
best fit (best_fit
) and all other models (all_fits
)
Examples
set.seed(24101968)
library(tramvs)
N <- 1e2
P <- 5
nz <- 3
beta <- rep(c(1, 0), c(nz, P - nz))
X <- matrix(rnorm(N * P), nrow = N, ncol = P)
Y <- 1 + X %*% beta + rnorm(N)
dat <- data.frame(y = Y, x = X)
res <- tramvs(y ~ ., data = dat, modFUN = Lm)
plot(res, type = "s")
plot(res, which = "path")