Learn R Programming

adelie (version 1.0.7)

glm.poisson: Creates a Poisson GLM family object.

Description

A GLM family object specifies the type of model fit, provides the appropriate response object and makes sure it is represented in the right form for the model family, and allows for optional parameters such as a weight vector.

Usage

glm.poisson(y, weights = NULL)

Value

Poisson GLM object.

Arguments

y

Response vector of non-negative counts.

weights

Observation weight vector, with default NULL.

Author

James Yang, Trevor Hastie, and Balasubramanian Narasimhan
Maintainer: Trevor Hastie hastie@stanford.edu

See Also

glm.gaussian, glm.binomial, glm.poisson, glm.multinomial, glm.multigaussian, glm.cox.

Examples

Run this code
n <- 100
y <- rpois(n, 1)
obj <- glm.poisson(y)

Run the code above in your browser using DataLab