mlogit2logit function

Converting Multinomial Logit Data into Binary Logit Data

Converting Multinomial Logit Data into Binary Logit Data

Converts multinomial logit data into a combination of several binary logit data sets, in order to analyze it via the Begg & Gray approximation using a binary logistic regression. 1.1

mlogit2logit(f, data, choices = NULL, base.choice = 1, varying = NULL, sep = ".")

Arguments

  • f: Formula as described in Details of mnl.spec.
  • data: Data frame containing the variables of the model.
  • choices: Vector of names of alternatives. If it is not given, it is determined from the response column of the data frame. Values of this vector should match or be a subset of those in the response column. If it is a subset, data is reduced to contain only observations whose choice is contained in choices.
  • base.choice: Index of the base alternative within the vector choices.
  • varying: Indices of variables within data that are alternative-specific.
  • sep: Separator of variable name and alternative name in the varying variables.

Details

Details of the conversion algorithm are described in the vignette of this package, see vignette('conversion').

Note

This function is called from within the bic.mlogit and thus usually will not need to be called explicitly.

Returns

List with components: - data: Converted data set.

  • formula: Formula to be used with the converted data set.

  • nobs: Number of observations in the original data set.

  • z.index: Index of all ZZ columns within data (see vignette for details), i.e. columns that correspond to alternative specific constants.

  • z.names: Names of the ZZ columns.

  • zcols: List in which each element corresponds to any of the data columns that involve ZZ, which is either ZZ itself or an interaction between a variable and ZZ, (see vignette). The value of such element is a vector with the components name : either ZZ itself, or name of the corresponding XX or UU variable with which ZZ interacts; choice : which alternative it belongs to; intercept : logical determining if it is an alternative specific constant.

  • choices: Vector of names of the alternatives.

  • choice.main.intercept: Index of alternative within choices that corresponds to the main intercept of the binary logistic model.

References

Begg, C.B., Gray, R. (1984) Calculation of polychotomous logistic regression parameters using individualized regressions. Biometrika 71 , 11--18.

Yeung, K.Y., Bumgarner, R.E., Raftery, A.E. (2005) Bayesian model averaging: development of an improved multi-class, gene selection and classification tool for microarray data. Bioinformatics 21 (10), 2394--2402.

Author(s)

Hana Sevcikova

See Also

mnl.spec

Examples

data(heating) bin.data <- mlogit2logit(depvar ~ ic + oc, heating, choices=1:5, varying=3:12, sep='') bin.glm <- glm(bin.data$formula, 'binomial', data=bin.data$data) summary(bin.glm)
  • Maintainer: Hana Sevcikova
  • License: GPL (>= 2)
  • Last published: 2024-10-17

Useful links