fit.gamma.IWLS: Fit the gamma model with IWLS method.

View source: R/gamma.fit.R

fit.gamma.IWLSR Documentation

Fit the gamma model with IWLS method.

Description

Use IWLS method fit the gamma model which is an example of generalized linear model.

Usage

fit.gamma.IWLS(x, y, weight = NULL, start = NULL, lambda = 0)

Arguments

x

Input matrix, of dimension n \times p; each row is an observation vector and each column is a predictor/feature/variable.

y

The response variable, of n observations.

weight

Observation weights. When weight = NULL, we set weight = 1 for each observation as default.

start

the start point of fitness.

lambda

A single lambda value for L2 regularized. Default is 0.

Value

Intercept and linear coefficient.

Examples

## Not run: 
n <- 1000
p <- 10
dataset <- generate.data(n, p, p,family = "gamma", seed = 1)
coef <- fit.gamma.IWLS(dataset[["x"]],dataset[["y"]])

## End(Not run)

bbayukari/StatComp21077 documentation built on March 21, 2022, 2:03 a.m.