Usage
mdm(formula, data, weights, subset, na.action, MaxNWts, maxit = 1000, contrasts = NULL, Hess = FALSE, censored = FALSE, model = TRUE, use.shortcut = TRUE, ...)
Arguments
formula
a formula expression as for regression models, of the form response ~ predictors. The response
should be a matrix with K columns comprising proportions 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 numeric matrix with K columns. See the documentation of formula() for other details.
data
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame)
containing the variables in the model. If not found in data, the variables are taken from
environment(formula), typically the environment from which mdm
is called.
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.
MaxNWts
The maximum allowable number of weights. There is no limit in the code, but MaxNWts
is set to the exact number of required as specified in the formula.
Thus it should not need to be changed when fitting mdm
.
maxit
maximum number of iterations. Default 1000.
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 O/E information matrix) should be returned.
censored
If Y is a matrix with K > 2 columns, interpret the entries as one for possible classes,
zero for impossible classes, rather than as counts.
model
logical. If true, the model frame is saved as component model of the returned object.
use.shortcut
logical. If true, and the model is ~1 (a constant) or ~sites (a factor with one level for each site)
then the model is not fitted since the fitted values are known in each case. The first (alpha) model
has fitted values equal to the input data and the second (gamma) model fits the row means.
Fitting the alpha-model using nnet can be prohibitively expensive in computational time and
is unneccessary.
The returned models when use.shortcut == TRUE has the same components as when use.shortcut == FALSE,
and hence can be used in anova tables and plotting.
Using use.shortcut == TRUE can result in saving > 99% of computational time for a collection of models.
...
additional arguments for nnet.