msaenet.nzv.all: Get Indices of Non-Zero Variables in All Steps

View source: R/msaenet-inspect.R

msaenet.nzv.allR Documentation

Get Indices of Non-Zero Variables in All Steps

Description

Get the indices of non-zero variables in all steps from msaenet model objects.

Usage

msaenet.nzv.all(object)

Arguments

object

An object of class msaenet produced by aenet, amnet, asnet, msaenet, msamnet, or msasnet.

Value

List containing indices vectors of non-zero variables in all steps.

Author(s)

Nan Xiao <https://nanx.me>

Examples

dat <- msaenet.sim.gaussian(
  n = 150, p = 500, rho = 0.6,
  coef = rep(1, 5), snr = 2, p.train = 0.7,
  seed = 1001
)

msaenet.fit <- msaenet(
  dat$x.tr, dat$y.tr,
  alphas = seq(0.2, 0.8, 0.2),
  nsteps = 3L, seed = 1003
)

msaenet.nzv.all(msaenet.fit)

road2stat/msaenet documentation built on March 4, 2024, 10:12 p.m.