coef.cv_plmm: Coef method for "cv_plmm" class

View source: R/coef-cv-plmm.R

coef.cv_plmmR Documentation

Coef method for "cv_plmm" class

Description

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))


plmmr documentation built on April 4, 2025, 12:19 a.m.