multinom(formula, data=sys.parent(), weights, subset, na.action, contrasts=NULL, Hess=F, summ=0, censored=F, ...)
response ~ predictors
. The response
should be a factor or a matrix with K columns, which will be
interpreted as counts for each of K classes. A log-linear model is
fitted, with coefficients zero for the first class. An offset can be
included: it should be a matrix with K columns if the response is a
matrix with K columns or a factor with K > 2 classes, or a vector
for a factor with 2 levels. See the documentation of
formula
for other details.
formula
.
C
); method 3 also combines rows
with the same X and different Y, which changes the baseline for the
deviance.
K > 2
columns, interpret the entries as one
for possible classes, zero for impossible classes, rather than as
counts.
nnet
multinom
calls
nnet
. The variables on the rhs of the
formula should be roughly scaled to [0,1] or the fit will be slow or
may not converge at all.
nnet
object with additional slots.
Hess
is true).
"multinom"
library(MASS) # To get birthwt dataset bwt.mu <- multinom(low ~ ., birthwt)