mblogit: Multinomial (Baseline) Logit Models for Categorical and...

Description Usage Arguments Details Value

View source: R/mblogit.R

Description

The function mblogit fits multinomial logit models for categorical and multinomial count responses with fixed alternatives, where the logits are relative to a baseline category.

Usage

1
2
3
mblogit(formula, data = parent.frame(), subset, weights = NULL,
  na.action = getOption("na.action"), model = TRUE, x = FALSE, y = TRUE,
  contrasts = NULL, control = mclogit.control(...), ...)

Arguments

formula

the model formula. The response must be a factor or a matrix of counts.

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 glm is called.

subset

an optional vector specifying a subset of observations to be used in the fitting process.

weights

an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

na.action

a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful.

model

a logical value indicating whether model frame should be included as a component of the returned value.

x,y

logical values indicating whether the response vector and model matrix used in the fitting process should be returned as components of the returned value.

contrasts

an optional list. See the contrasts.arg of model.matrix.default.

control

a list of parameters for the fitting process. See mclogit.control

...

arguments to be passed to mclogit.control

Details

The function mblogit internally rearranges the data into a 'long' format and uses mclogit.fit to compute estimates. Nevertheless, the 'user data' is unaffected.

Value

mblogit returns an object of class "mblogit", which has almost the same structure as an object of class "glm". The difference are the components coefficients, residuals, fitted.values, linear.predictors, and y, which are matrices with number of columns equal to the number of response categories minus one.


mclogit documentation built on May 2, 2019, 4:41 p.m.

Related to mblogit in mclogit...