This tool set provides a set of functions to fit the nested Dirichlet process mixture of products of multinomial distributions (NDPMPM) model for nested categorical household data in the presence of impossible combinations. It has direct applications in imputing missing values for and generating synthetic versions of nested household data.

Implements nested k*l-fold cross-validation for lasso and elastic-net regularised linear models via the 'glmnet' package and other machine learning models via the 'caret' package. Cross-validation of 'glmnet' alpha mixing parameter and embedded fast filter functions for feature selection are provided. Described as double cross-validation by Stone (1977) <doi:10.1111/j.2517-6161.1977.tb01603.x>. Also implemented is a method using outer CV to measure unbiased model performance metrics when fitting Bayesian linear and logistic regression shrinkage models using the horseshoe prior over parameters to encourage a sparse model as described by Piironen & Vehtari (2017) <doi:10.1214/17-EJS1337SI>.

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.

Provides a nested menu widget for usage in 'Shiny'
    applications. This is useful for hierarchical choices (e.g. continent,
    country, city).

A modelling framework for nested data using the 'tidymodels' 
    ecosystem. Specify how to nest data using the 'recipes' package, create 
    testing and training splits using 'rsample', and fit models to this data
    using the 'parsnip' and 'workflows' packages. Allows any model to be fit
    to nested data.