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
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 Z columns within data (see vignette for details), i.e. columns that correspond to alternative specific constants.
z.names: Names of the Z columns.
zcols: List in which each element corresponds to any of the data columns that involve Z, which is either Z itself or an interaction between a variable and Z, (see vignette). The value of such element is a vector with the components name : either Z itself, or name of the corresponding X or U variable with which Z 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.