mnl: Multinomial logistic regression

View source: R/mnl.R

mnlR Documentation

Multinomial logistic regression

Description

Multinomial logistic regression

Usage

mnl(
  dataset,
  rvar,
  evar,
  lev = "",
  int = "",
  wts = "None",
  check = "",
  data_filter = "",
  arr = "",
  rows = NULL,
  envir = parent.frame()
)

Arguments

dataset

Dataset

rvar

The response variable in the model

evar

Explanatory variables in the model

lev

The level in the response variable to use as the baseline

int

Interaction term to include in the model

wts

Weights to use in estimation

check

Use "standardize" to see standardized coefficient estimates. Use "stepwise-backward" (or "stepwise-forward", or "stepwise-both") to apply step-wise selection of variables in estimation.

data_filter

Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")

arr

Expression to arrange (sort) the data on (e.g., "color, desc(price)")

rows

Rows to select from the specified dataset

envir

Environment to extract data from

Details

See https://radiant-rstats.github.io/docs/model/mnl.html for an example in Radiant

Value

A list with all variables defined in mnl as an object of class mnl

See Also

summary.mnl to summarize the results

plot.mnl to plot the results

predict.mnl to generate predictions

plot.model.predict to plot prediction output

Examples

result <- mnl(
  ketchup,
  rvar = "choice",
  evar = c("price.heinz28", "price.heinz32", "price.heinz41", "price.hunts32"),
  lev = "heinz28"
)
str(result)


radiant-rstats/radiant.model documentation built on Nov. 29, 2023, 5:59 a.m.