glm.multinomial: 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)
Value
Multinomial GLM object.
Arguments
y
Response matrix with K>1 columns, and row sums equal to 1. This can either be a "one-hot" encoded version of a K-category factor variable, or else a matrix of proportions. This is useful for grouped multinomial data, where column y[i, k] represents the proportion of outcomes in category k in n[i] trials. Then the corresponding element of the weight vector is w[i]=n[i].
weights
Observation weights.
Author
James Yang, Trevor Hastie, and Balasubramanian Narasimhan Maintainer: Trevor Hastie hastie@stanford.edu