Learn R Programming

BeSS (version 2.0.2)

print.bess: print method for a "bess" object

Description

Print the primary elements of the "bess" object.

Usage

# S3 method for bess
print(x, digits = max(5, getOption("digits") - 5), nonzero = FALSE, ...)

Arguments

x

A "bess" object.

digits

Minimum number of significant digits to be used.

nonzero

Whether the output should only contain the non-zero coefficients.

additional print arguments

Details

prints the fitted model and returns it invisibly.

References

Wen, C., Zhang, A., Quan, S. and Wang, X. (2020). BeSS: An R Package for Best Subset Selection in Linear, Logistic and Cox Proportional Hazards Models, Journal of Statistical Software, Vol. 94(4). doi:10.18637/jss.v094.i04.

See Also

bess, coef.bess.

Examples

Run this code
# NOT RUN {
# Generate simulated data
n = 200
p = 20
k = 5
rho = 0.4
seed = 10
Tbeta <- rep(0, p)
Tbeta[1:k*floor(p/k):floor(p/k)] <- rep(1, k)
Data = gen.data(n, p, k, rho, family = "gaussian", beta = Tbeta, seed=seed)
lm.bss = bess(Data$x, Data$y, method = "sequential")
lambda.list = exp(seq(log(5), log(0.1), length.out = 10))
lm.bsrr = bess(Data$x, Data$y, type = "bsrr", lambda.list = lambda.list, method = "sequential")

print(lm.bss)
print(lm.bsrr)

# }

Run the code above in your browser using DataLab