coef.bess {BeSS}R Documentation

Provides estimated coefficients from a fitted "bess" object.

Description

Similar to other prediction methods, this function provides estimated coefficients from a fitted "bess" object.

Usage

    ## S3 method for class 'bess'
coef(object, sparse=TRUE, type = c("ALL", "AIC", "BIC", "EBIC"),...)

Arguments

object

A "bess" project or a "bess.one" project.

sparse

Logical or NULL, specifying whether the coefficients should be presented as sparse matrix or not.

type

Types of coefficients returned. type = "AIC" cooresponds to the coefficient with optimal AIC value; type = "BIC" cooresponds to the coefficient with optimal BIC value; type = "EBIC" cooresponds to the coefficient with optimal EBIC value; type = "ALL" cooresponds to all coefficients in the bess object. Default is ALL.

...

Other arguments.

Author(s)

Canhong Wen, Aijun Zhang, Shijie Quan, and Xueqin Wang.

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, bess.one

Examples


data <- gen.data(500, 20, family = "gaussian", 10, 0.2, 1)
fit <- bess(data$x, data$y, family = "gaussian")
coef(fit, sparse=TRUE)  # The estimated coefficients

[Package BeSS version 2.0.4 Index]