Learn R Programming

DAMisc (version 1.3)

mnlChange2: Average Effects for Multinomial Logistic Regression Models

Description

Calculates average effects of a variable in multinomial logistic regression holding all other variables at observed values.

Usage

mnlChange2(obj, varname, data, change = c("unit", "sd"), R = 1500)

Arguments

obj
An object of class multinom
varname
A string identifying the variable to be manipulated.
data
Data frame used to fit object.
change
A string indicating the difference in predictor values to calculate the discrete change. sd gives plus and minus one-half standard deviation change around the median and unit gives a plus and minus one-half unit change around the
R
Number of simulations.

Value

  • A list with elements:
  • meanAverage effect of the variable for each category of the dependent variable.
  • lowerLower 95 percent confidence bound
  • upperUpper 95 percent confidence bound

Examples

Run this code
library(nnet)
data(france)
mnl.mod <- multinom(vote ~ age + male + retnat + lrself, data=france)
mnlChange2(mnl.mod, "lrself", data=france, )

Run the code above in your browser using DataLab