Learn R Programming

aglm (version 0.4.1)

coef.AccurateGLM: Get coefficients

Description

Get coefficients

Usage

# S3 method for AccurateGLM
coef(object, index = NULL, name = NULL, s = NULL, exact = FALSE, ...)

Value

If index or name is given, the function returns a list with the one or combination of the following fields, consisting of coefficients related to the specified variable.

  • coef.linear: A coefficient of the linear term. (If any)

  • coef.OD: Coefficients of O-dummies. (If any)

  • coef.UD: Coefficients of U-dummies. (If any)

  • coef.LV: Coefficients of L-variables. (If any)

If both index and name are not given, the function returns entire coefficients corresponding to the internal designed matrix.

Arguments

object

A model object obtained from aglm() or cv.aglm().

index

An integer value representing the index of variable whose coefficients are required.

name

A string representing the name of variable whose coefficients are required. Note that if both index and name are set, index is discarded.

s

Same as in coef.glmnet.

exact

Same as in coef.glmnet.

...

Other arguments are passed directly to coef.glmnet().

Author

Kenji Kondo