Learn R Programming

MNP (version 1.0-4)

ymatrix.mnp: ymatrix.mnp: Generating the response matrix for the Multinomial Probit Models

Description

ymatrix.mnp.R is a function used to generate the response matrix for the Multinomial Probit models.

Usage

ymatrix.mnp(data, base=NULL, extra=FALSE, verbose=verbose)

Arguments

data
A model frame.
base
The name of the base category. The default is the lowest level of the response variable. For the Multinomial ordered Probit model, the default base category will be the last column in the response variables.
extra
logical. TRUE for generating the names for the coefficients as well as the model matrix. The default is FALSE.
verbose
logical. If TRUE, helpful messages are printed on the screen. The default is FALSE.

Value

  • If extra=TRUE, a list containing the following elements:
  • YThe response matrix.
  • MoPlogical. TRUE for the Multinomial ordered Probit model, and FALSE for the standard Multinomial Probit model.
  • levThe factor level of the response variable.
  • pThe total number of alternatives.
  • baseThe base category name.
  • If extra=FALSE, the response matrix will be returned.

See Also

mprobit, xmatrix.mnp