Learn R Programming

SALES (version 1.0.2)

print.cpernet: Print a cpernet object

Description

Print a summary of the cpernet path at each step along the path.

Usage

# S3 method for cpernet
print(x, digits = max(3, getOption("digits") - 3), ...)

Value

a three-column matrix, the first two columns are the number of nonzero mean and scale coefficients respectively and the third column is

Lambda.

Arguments

x

fitted cpernet object.

digits

significant digits in the output.

...

additional print arguments.

Author

Yuwen Gu and Hui Zou

Maintainer: Yuwen Gu <yuwen.gu@uconn.edu>

Details

The call that produced the cpernet object is printed, followed by a three-column matrix with columns Df1, Df2 and Lambda. The Df1 and Df2 columns are the number of nonzero mean and scale coefficients respectively.

Examples

Run this code

set.seed(1)
n <- 100
p <- 400
x <- matrix(rnorm(n * p), n, p)
y <- rnorm(n)
tau <- 0.30
pf <- abs(rnorm(p))
pf2 <- abs(rnorm(p))
w <- 2.0
lambda2 <- 1
m2 <- cpernet(y = y, x = x, w = w, tau = tau, eps = 1e-8,
              pf.mean = pf, pf.scale = pf2,
              standardize = FALSE, lambda2 = lambda2)
print(m2)

Run the code above in your browser using DataLab