Skip to contents

Package overview

polychoice polychoice-package
polychoice: Multinomial Choice, Inflated Multinomial Logit, and Tests of IIA

Estimators

One formula interface, one class, one set of methods.

mnl()
Multinomial and conditional logit regression
imnl()
Inflated multinomial logit regression
nlogit()
Nested logit regression
hev()
Heteroskedastic extreme value regression
mnprobit()
Multinomial probit regression
remnl()
Multinomial logit with random alternative-specific intercepts
rologit()
Rank-ordered (exploded) logit regression

Separation and priors

separation()
Separation in multinomial, conditional and rank-ordered logit data
coef_prior()
Prior distributions for the coefficients of a penalized fit

Inference and summaries

summary(<choicemodel>)
Summarize a choice model
confint(<choicemodel>)
Confidence intervals for a choice model
update(<choicemodel>)
Update and refit a choice model
residuals(<choicemodel>)
Residuals of a choice model

Quantities of interest

predict(<choicemodel>)
Predictions from a choice model
first_difference()
First differences in predicted probabilities
rrr()
Relative risk ratios

Fit and model comparison

fit_stats()
Fit statistics for a choice model
classification()
Classification table of a choice model
compare_models()
Compare several choice models side by side
lr_test()
Likelihood-ratio test for nested choice models
vuong()
Vuong test for non-nested or overlapping choice models
boot_lr_test()
Parametric-bootstrap likelihood-ratio (and Vuong) test of nested fits

Tests of IIA

iia_tests()
The battery of IIA tests
hausman_mcfadden()
Hausman-McFadden test of IIA
small_hsiao()
Small-Hsiao test of IIA
fp_tests()
Fok-Paap tests of multinomial logit misspecification
nested_lm_test()
Nested-logit score test of IIA

Further specification tests

captivity_test()
Tests for captive (inflated) choosers: score and likelihood ratio
combine_test()
Test whether two alternatives can be combined
term_test()
Joint tests of each term across equations
hl_test()
Hosmer-Lemeshow-type goodness-of-fit test for multinomial models
rank_test()
Stability of preferences across ranking stages
boot_pvalue()
Parametric-bootstrap p-values for a specification test

Panel tools

mundlak()
Mundlak (correlated random effects) device

Simulation

rmnl()
Simulate multinomial-logit (optionally inflated) choice data
rnlogit()
Simulate nested-logit choice data
rhev()
Simulate heteroskedastic extreme value choice data
rmnp()
Simulate multinomial probit choice data
rrologit()
Simulate rank-ordered choice data
simulate(<choicemodel>)
Simulate outcomes from a fitted choice model

broom methods

tidy(<choicemodel>)
Tidy a choice model (broom method)
glance(<choicemodel>)
Glance at a choice model (broom method)
augment(<choicemodel>)
Augment the estimation cases with fitted classes and probabilities (broom method)

Data

pa2006
2006 Pennsylvania state House vote choice (Arceneaux and Kolodny 2009)
pres2004
2004 presidential vote choice (Campbell and Monson 2008)
sanctions
Economic sanctions, military force and domestic unrest (Liou 2024)
fluvax
Intended flu vaccination and international collaboration (Liu et al. 2024)
bes1987
Vote choice and issue distances in the 1987 British general election (Glasgow 2001)
defection
Who leaves insurgent groups: Colombian ex-combatants (Oppenheim et al. 2015; Cook, Niehaus and Zuhlke 2018)
bes2010
Candidate-voter distance and vote choice in England, 2010 (Arzheimer and Evans 2012)
cabinets
Government formation in the German states, 1990-2023 (Baeck, Debus and Imre 2026)
afghan_leaders
Rankings of leader attributes in northern Afghanistan (Bhatia and Monroe 2024)