msaenet.fp: Get the Number of False Positive Selections

Description Usage Arguments Value Author(s) Examples

View source: R/msaenet-inspect.R

Description

Get the number of false positive selections from msaenet model objects, given the indices of true variables (if known).

Usage

1
msaenet.fp(object, true.idx)

Arguments

object

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

true.idx

Vector. Indices of true variables.

Value

Number of false positive variables in the model.

Author(s)

Nan Xiao <https://nanx.me>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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.fp(msaenet.fit, 1:5)

road2stat/msaenet documentation built on Dec. 17, 2018, 10:09 a.m.