Skip to contents

Coef method for "cv_plmm" class

Usage

# S3 method for class 'cv_plmm'
coef(object, lambda, which = object$min, ...)

Arguments

object

An object of class "cv_plmm."

lambda

A numeric vector of lambda values.

which

Vector of lambda indices for which coefficients to return. Defaults to lambda index with minimum CVE.

...

Additional arguments (not used).

Value

Returns a named numeric vector. Values are the coefficients of the model at the specified value of either lambda or which. Names are the values of lambda.

Examples

admix_design <- create_design(X = admix$X, y = admix$y)
cv_fit <- cv_plmm(design = admix_design, return_fit = TRUE)
head(coef(cv_fit))
#> (Intercept)        Snp1        Snp2        Snp3        Snp4        Snp5 
#>   4.2298130   0.0000000   0.0000000   0.2631347   0.0000000   0.0000000