coef.mcen: Returns the coefficients from an mcen object.

View source: R/mcen.r

coef.mcenR Documentation

Returns the coefficients from an mcen object.

Description

Returns the coefficients from an mcen object.

Usage

## S3 method for class 'mcen'
coef(object, delta = NULL, ...)

Arguments

object

The mcen object.

delta

The L1 tuning parameter

...

Additional values to pass on.

Value

The matrix of coefficients.

Author(s)

Ben Sherwood <ben.sherwood@ku.edu>, Brad Price <brad.price@mail.wvu.edu>

Examples

x <- matrix(rnorm(400),ncol=4)
beta <- beta <- matrix(c(1,1,0,0,0,0,-1,-1,0,0,-1,-1,1,1,0,0),ncol=4)
y <- x%*%beta + rnorm(400) 
mcen_fit <- mcen(x,y,ky=2,gamma_y=3,delta=c(1,2))
best_coef <- coefficients(mcen_fit,delta=1)

mcen documentation built on April 1, 2023, 12:11 a.m.

Related to coef.mcen in mcen...