glm.multinomial {adelie} | R Documentation |
Creates a Multinomial 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.multinomial(y, weights = NULL)
Arguments
y |
Response matrix with |
weights |
Observation weights. |
Value
Multinomial GLM object.
Author(s)
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
n <- 100
K <- 5
y <- t(rmultinom(n, 1, rep(1/K, K)))
obj <- glm.multinomial(y)