Package: nestedLogit 0.4.2

nestedLogit: Nested Dichotomy Logistic Regression Models

Provides functions for specifying and fitting nested dichotomy logistic regression models for a multi-category response and methods for summarising and plotting those models. Nested dichotomies are statistically independent, and hence provide an additive decomposition of tests for the overall 'polytomous' response. When the dichotomies make sense substantively, this method can be a simpler alternative to the standard 'multinomial' logistic model which compares response categories to a reference level. See: J. Fox (2016), "Applied Regression Analysis and Generalized Linear Models", 3rd Ed., ISBN 1452205663.

Authors:John Fox [aut], Michael Friendly [aut, cre], Achim Zeileis [ctb]

nestedLogit_0.4.2.tar.gz
nestedLogit_0.4.2.zip(r-4.7)nestedLogit_0.4.2.zip(r-4.6)nestedLogit_0.4.2.zip(r-4.5)
nestedLogit_0.4.2.tgz(r-4.6-any)nestedLogit_0.4.2.tgz(r-4.5-any)
nestedLogit_0.4.2.tar.gz(r-4.7-any)nestedLogit_0.4.2.tar.gz(r-4.6-any)
nestedLogit_0.4.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
nestedLogit/json (API)

# Install 'nestedLogit' in R:
install.packages('nestedLogit', repos = c('https://friendly.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/friendly/nestedlogit/issues

Pkgdown/docs site:https://friendly.github.io

Datasets:
  • gators - Alligator Food Choice
  • GSS - Data From the U.S. General Social Survey 1972-2016
  • HealthInsurance - Choice of Health Insurance Product

On CRAN:

Conda:

logistic-regressionmultinomial-logistic-regressionpolytomous-variables

7.92 score 10 stars 64 scripts 6.2k downloads 8 exports 74 dependencies

Last updated from:b0a0ac7fee. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK232
source / vignettesOK274
linux-release-x86_64OK261
macos-release-arm64OK129
macos-oldrel-arm64OK143
windows-develOK132
windows-releaseOK142
windows-oldrelOK122
wasm-releaseOK203

Exports:as.dichotomiesas.treecontinuationLogitsdichotomylogitsmodelsnestedLogitRSQ

Dependencies:abindbackportsbootbroomcarcarDataclicolorspacecowplotcpp11DBIDerivdoBydplyreffectsestimabilityfarverforecastFormulafracdiffgenericsggplot2gluegtableinsightisobandlabelinglatticelifecyclelme4lmtestmagrittrMASSMatrixMatrixModelsmgcvminqamitoolsmodelrnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpurrrquantregR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasrlangS7scalesSparseMstringistringrsurveysurvivaltibbletidyrtidyselecttimeDateurcautf8vctrsviridisLitewithrzoo

Displaying nestedLogit Models as LaTeX Equations
Overview | Fitting a nested logit model | Symbolic equations | Work dichotomy (not working vs. working) | Full-time dichotomy (part-time vs. full-time) | Logit notation | Using extract_eq() options | Equations with fitted coefficients | Coloring symbols | Equations for individual sub-models | Using the raw LaTeX | Alligator food choice: gators data | References

Last update: 2026-05-27
Started: 2026-03-22

Nested-dichotomies logistic regression models
Models for polytomous responses | Multinomial logit model | Nested-dichotomies logit model | Example: Women's labor-force participation | Defining nested dichotomies | Using dichotomy() and logits() to define the response | Using nestedLogit() to fit the model | Methods for "nestedLogit" objects | Obtaining fitted values: predict() | Plotting "nestedLogit" objects | Effect plots for "nestedLogit" models | Alternative models for the Womenlf data | References

Last update: 2026-03-08
Started: 2023-05-08

Other Examples of Nested Logit Models
Introduction | Load packages | Chilean plebiscite voting intent (carData::Chile) | Data | Two competing tree structures | Engagement-first tree | Direction-first tree | Fitting the models | Omnibus tests | Which tree fits better? | Pseudo-R² measures | Predicted probabilities | Plotting logits | Travel mode choice (AER::TravelMode) | Data structure | Nesting structure | Fitting | Model comparison | Fishing mode choice (mlogit::Fishing) | Overview | Plots | Arthritis treatment outcome (vcd::Arthritis) | Plotting | Smoking status (MASS::survey) | Ordinal examples — brief sketches | Pneumoconiosis severity (VGAM::pneumo) | Mental health status (Agresti) | Session info | References

Last update: 2026-03-08
Started: 2026-03-02

Using ggeffects with nestedLogit models
Overview | 👩 Women's labor force participation | Predicted probabilities with predict_response() | Customizing the plot | Plotting on the logit scale | Plotting the dichotomies | 🐊 Alligator food choice | Summary | References

Last update: 2026-03-05
Started: 2026-03-03

Plotting nestedLogit models with ggplot2
Fitted probabilities | Plotting with ggplot2 | Direct labels | Plotting log-odds | Predicted logit values for the dichotomies | Alternative model | References

Last update: 2024-06-03
Started: 2023-05-28

Standard Errors of Fitted Category Probabilities by the Delta Method for the Nested Logit Model
Notation | An Example | Variances of the Estimated Probabilities | For the Dichotomous Logit Models | For the Nested Logit Model | Acknowledgment | Reference

Last update: 2023-05-30
Started: 2023-05-27

Readme and manuals

Help Manual

Help pageTopics
Convert a Predicted Objects to a data.frameas.data.frame.predictNestedLogit
Display the Tree Structure of Nested Dichotomiesas.tree as.tree.continuationDichotomies as.tree.dichotomies
Broom Related MethodsbroomMethods glance.nestedLogit tidy.nestedLogit
Effect Displays for Nested Logit ModelsEffect.nestedLogit
Extract Equations for a '"nestedLogit"' Modelextract_eq.nestedLogit
Alligator Food Choicegators
Data From the U.S. General Social Survey 1972-2016GSS
Choice of Health Insurance ProductHealthInsurance
Extract Binary Logit Models from a 'nestedLogit' Objectmodels models.nestedLogit
Hypothesis-Testing and Related Methods for '"nestedLogit"' ObjectsAnova.nestedLogit anova.nestedLogit linearHypothesis.nestedLogit logLik.nestedLogit nestedHypotheses print.Anova.nestedLogit print.anova.nestedLogit
Binary Logit Models for Nested DichotomiescontinuationLogits dichotomy logits nestedLogit
Methods for '"nestedLogit"' and Related Objectsas.character.dichotomies as.dichotomies as.dichotomies.matrix as.matrix.continuationDichotomies as.matrix.dichotomies coef.nestedLogit nestedMethods print.dichotomies print.nestedLogit print.summary.nestedLogit summary.nestedLogit update.nestedLogit vcov.nestedLogit
Plotting Nested Logit Modelsplot.nestedLogit
Predicted Probabilities and Logits for '"nestedLogit"' Modelsconfint.predictNestedLogit fitted.nestedLogit predict.nestedLogit print.predictDichotomies print.predictNestedLogit
Pseudo-R² Measures for Nested Logit and Related Modelsprint.RSQ.multinom print.RSQ.nestedLogit print.RSQ.polr RSQ RSQ.multinom RSQ.nestedLogit RSQ.polr