pnglm.fit: Penalized GLM

View source: R/pnglm.fit.R

pnglm.fitR Documentation

Penalized GLM

Description

Fit the generalized linear model under a constraint.

Generate a list of option values.

Usage

pnglm.fit(
  x,
  y,
  coef = NULL,
  offset = NULL,
  family = gaussian(),
  lambda = 0,
  K = NULL,
  control = list(),
  ...
)

pnglm.options()

Arguments

x

A model matrix.

y

fault An integer vector for the number of faults detected in time intervals. The fault detected just at the end of time interal is not counted.

coef

A numeric vector indicating starting coefficients.

offset

An integer. This can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases.

family

A description of the error distribution and link function to be used in the model.

lambda

A numeric value indicating the penalized parameter. When lambda = 0, coefficients are unconstraint.

K

A matrix to detect the contraint structure. The default is an identity matrix.

control

A list of control parameters. See Details.

...

Other parameters.

Details

The control argument is a list that can supply any of the following components:

maxiter

An integer for the maximum number of iterations.

reltol

A numeric value. The algorithm stops if the relative error is less than reltol and the absolute error is less than abstol.

abstol

A numeric value. The algorithm stops if the relative error is less than reltol and the absolute error is less than abstol.

trace

A logical. If TRUE, the intermediate parameters are printed.

printsteps

An integer for print.

Value

A list with components;

initial

A vector for initial parameters.

srm

A class of NHPP. The SRM with the estiamted parameters.

llf

A numeric value for the maximum log-likelihood function.

df

An integer for degrees of freedom.

convergence

A boolean meaning the alorigthm is converged or not.

iter

An integer for the number of iterations.

aerror

A numeric value for absolute error.

rerror

A numeric value for relative error.

ctime

A numeric value for computation time.

call

The method call.

A list of options.


okamumu/msrat documentation built on Jan. 17, 2024, 11:55 a.m.