poisson_reg_offset {offsetreg}R Documentation

Poisson regression models with offsets

Description

poisson_reg_offset() defines a generalized linear model of count data with an offset that follows a Poisson distribution.

Usage

poisson_reg_offset(
  mode = "regression",
  penalty = NULL,
  mixture = NULL,
  engine = "glm_offset"
)

Arguments

mode

A single character string for the type of model. The only possible value for this model is "regression".

penalty

A non-negative number representing the total amount of regularization (glmnet only).

mixture

A number between zero and one (inclusive) giving the proportion of L1 regularization (i.e. lasso) in the model.

  • mixture = 1 specifies a pure lasso model,

  • mixture = 0 specifies a ridge regression model, and

  • ⁠0 < mixture < 1⁠ specifies an elastic net model, interpolating lasso and ridge.

Available for glmnet and spark only.

engine

A single character string specifying what computational engine to use for fitting.

Details

This function is similar to parsnip::poisson_reg() except that specification of an offset column is required.

Value

A model specification object with the classes poisson_reg_offset and model_spec.

See Also

parsnip::poisson_reg()

Examples

parsnip::show_model_info("poisson_reg_offset")

poisson_reg_offset()


[Package offsetreg version 1.1.0 Index]