This function provides estimated coefficients from a fitted "abess" object.

# S3 method for abess
coef(object, support.size = NULL, sparse = TRUE, ...)



An "abess" project.


An integer vector specifies the coefficient fitted at given support.size. If support.size = NULL, then all coefficients would be returned. Default: support.size = NULL.


A logical value, specifying whether the coefficients should be presented as sparse matrix or not. Default: sparse = TRUE.


Other arguments.


A coefficient matrix when fitting an univariate model including gaussian, binomial, poisson, and cox; otherwise, a list containing coefficient matrices. For a coefficient matrix, each row is a variable, and each column is a support size.