Learn R Programming

mets (version 1.3.11)

predict.mlogit: Predictions from Multinomial Regression

Description

Computes predicted probabilities for the categorical outcome based on a mlogit object. Can return probabilities for all categories or only for the observed response.

Usage

# S3 method for mlogit
predict(
  object,
  newdata,
  se = TRUE,
  response = TRUE,
  Y = NULL,
  level = 0.95,
  ...
)

Value

A matrix or data frame containing:

pred

Predicted probabilities.

se

Standard errors (if se=TRUE).

lower, upper

Confidence intervals (if se=TRUE).

If response=FALSE, columns correspond to the levels of the outcome factor.

Arguments

object

Object of class "mlogit".

newdata

Data frame for prediction. If missing, predictions are made for the original data.

se

Logical; if TRUE, computes standard errors and confidence intervals.

response

Logical; if TRUE (default), returns probabilities only for the observed response (if newdata contains the response). If FALSE, returns probabilities for all categories.

Y

Vector of outcome levels to predict probabilities for (optional).

level

Confidence level for intervals (default 0.95).

...

Additional arguments.

Author

Thomas Scheike

See Also

mlogit