Learn R Programming

holiglm (version 1.0.1)

coef.hglm: Extract Model Coefficients

Description

The function returns different types of coefficients for a model.

Usage

# S3 method for hglm
coef(object, type = c("unscaled", "scaled", "selected"), ...)

Value

a vector containing the unscaled, scaled or selected coefficients.

Arguments

object

an object inheriting from "hglm" or "hglm.fit" from which the coefficients are obtained from.

type

Default value is "unscaled". Allowed values are "unscaled", "scaled" and "selected".

...

optional arguments currently ignored.

Details

The types "scaled" and "unscaled" refer to the coefficients of the scaled/unscaled optimization problem. Type "selected" refers to the active coefficients in the model active_coefficients.

Examples

Run this code
dat <- rhglm(1000, 1:3)
fit <- hglm(y ~ ., data = dat)
coef(fit)
coef(fit, type="scaled")
coef(fit, type="selected")

Run the code above in your browser using DataLab