Description Usage Arguments Details Value References See Also Examples
Fits multinomial loglinear models via neural networks.
1 2 3 
formula 
a formula expression as for regression models, of the form

data 
an optional data frame in which to interpret the variables occurring
in 
weights 
optional case weights in fitting. 
subset 
expression saying which subset of the rows of the data should be used in the fit. All observations are included by default. 
na.action 
a function to filter missing data. 
contrasts 
a list of contrasts to be used for some or all of the factors appearing as variables in the model formula. 
Hess 
logical for whether the Hessian (the observed/expected information matrix) should be returned. 
summ 
integer; if nonzero summarize by deleting duplicate rows and adjust weights.
Methods 1 and 2 differ in speed (2 uses 
censored 
If Y is a matrix with 
model 
logical. If true, the model frame is saved as component 
... 
additional arguments for 
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.
A nnet
object with additional components:
deviance 
the residual deviance, compared to the full saturated model (that explains individual observations exactly). Also, minus twice loglikelihood. 
edf 
the (effective) number of degrees of freedom used by the model 
AIC 
the AIC for this fit. 
Hessian 
(if 
model 
(if 
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
1 2 3 4 5 
brthwt> bwt < with(birthwt, {
brthwt+ race < factor(race, labels = c("white", "black", "other"))
brthwt+ ptd < factor(ptl > 0)
brthwt+ ftv < factor(ftv)
brthwt+ levels(ftv)[(1:2)] < "2+"
brthwt+ data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0),
brthwt+ ptd, ht = (ht > 0), ui = (ui > 0), ftv)
brthwt+ })
brthwt> options(contrasts = c("contr.treatment", "contr.poly"))
brthwt> glm(low ~ ., binomial, bwt)
Call: glm(formula = low ~ ., family = binomial, data = bwt)
Coefficients:
(Intercept) age lwt raceblack raceother smokeTRUE
0.82302 0.03723 0.01565 1.19241 0.74068 0.75553
ptdTRUE htTRUE uiTRUE ftv1 ftv2+
1.34376 1.91317 0.68020 0.43638 0.17901
Degrees of Freedom: 188 Total (i.e. Null); 178 Residual
Null Deviance: 234.7
Residual Deviance: 195.5 AIC: 217.5
# weights: 12 (11 variable)
initial value 131.004817
iter 10 value 98.029803
final value 97.737759
converged
Call:
multinom(formula = low ~ ., data = bwt)
Coefficients:
(Intercept) age lwt raceblack raceother smokeTRUE
0.82320102 0.03723828 0.01565359 1.19240391 0.74065606 0.75550487
ptdTRUE htTRUE uiTRUE ftv1 ftv2+
1.34375901 1.91320116 0.68020207 0.43638470 0.17900392
Residual Deviance: 195.4755
AIC: 217.4755
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.