Learn R Programming

plmmr (version 4.3.0)

coef.plmm: Coef method for plmm class

Description

Coef method for plmm class

Usage

# S3 method for plmm
coef(object, lambda, which = seq_along(object$lambda), drop = TRUE, ...)

Value

Either a numeric matrix (if model was fit on data stored in memory) or a sparse matrix (if model was fit on data stored filebacked). Rownames are feature names, columns are values of lambda.

Arguments

object

An object of class plmm.

lambda

A numeric vector of lambda values.

which

Vector of lambda indices for which to return coefficients.

drop

Logical. Should returned object be coerced to a vector if possible?

...

Additional arguments.

Examples

Run this code
admix_design <- create_design(X = admix$X, y = admix$y)
fit <- plmm(design = admix_design)
coef(fit)[1:10, 41:45]

Run the code above in your browser using DataLab