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 "formula".

data

data frame containing the variables in the model.

modFUN

function for fitting a transformation model, e.g., BoxCox().

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 modFUN(mandatory, ...) instead of the unconditional model.

supp_max

maximum support which to call abess_tram with.

k_max

maximum support size to consider during the splicing algorithm. Defaults to supp.

thresh

threshold when to stop splicing. Defaults to 0.01 * supp * p * log(log(n)) / n$, where p denotes the number of predictors and n the sample size.

init

initialize active set. Defaults to TRUE and initializes the active set with those covariates that are most correlated with score residuals of an unconditional modFUN(update(formula, . ~ 1)).

m_max

maximum number of iterating the splicing algorithm.

m0

Transformation model for initialization

verbose

show progress bar (default: TRUE)

...

additional arguments supplied to modFUN.

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


[Package tramvs version 0.0-4 Index]