Package: klue 0.6.3

Oliver Frings
klue: Hybrid Machine Learning and Random-Utility Workflow for Latent Class Multinomial Logit Model Specification
Implements the three-step workflow from Frings (2026, working paper) for specifying latent class multinomial logit (LCMNL) models. The maximum-likelihood multi-start is initialised from six clusterings of respondents' revealed-preference signatures (k-means, Gaussian mixture, hierarchical clustering with Ward, complete, and average linkage, and partitioning around medoids); LCMNL is estimated across a user-specified range of class counts; and a mixed multinomial logit (MMNL) benchmark is reported alongside BIC, AIC, ICL, and a classification-entropy diagnostic. Accepts long- or wide-format discrete-choice data with optional availability columns. Validated against five public reference datasets (Vittel, Apollo mode and route choice, Electricity, Swissmetro). Wraps the 'apollo' package for maximum-likelihood estimation.
Authors:
klue_0.6.3.tar.gz
klue_0.6.3.zip(r-4.7)klue_0.6.3.zip(r-4.6)klue_0.6.3.zip(r-4.5)
klue_0.6.3.tgz(r-4.6-any)klue_0.6.3.tgz(r-4.5-any)
klue_0.6.3.tar.gz(r-4.7-any)klue_0.6.3.tar.gz(r-4.6-any)
klue_0.6.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
klue/json (API)
| # Install 'klue' in R: |
| install.packages('klue', repos = c('https://o-frings.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/o-frings/klue/issues
Last updated from:6ec0a5dc34 (on main). Checks:7 WARNING, 2 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | WARNING | 170 | ||
| source / vignettes | OK | 220 | ||
| linux-release-x86_64 | WARNING | 161 | ||
| macos-release-arm64 | WARNING | 97 | ||
| macos-oldrel-arm64 | WARNING | 136 | ||
| windows-devel | WARNING | 123 | ||
| windows-release | WARNING | 148 | ||
| windows-oldrel | WARNING | 127 | ||
| wasm-release | OK | 110 |
Exports:build_databasebuild_database_longbuild_database_wideestimate_lcmnl_multistartestimate_mmnlestimate_mmnl_corrgenerate_datagenerate_data_defficientgenerate_data_with_covariatesklueklue_databaseklue_database_longklue_database_wideklue_demoklue_dgpklue_lcmnlklue_mmnlklue_mmnl_corrklue_mmnl_defaultsklue_simulateklue_simulate_covklue_simulate_deffklue_studyklue_study_clusteringklue_study_concomitantklue_study_convergenceklue_study_designklue_study_initialisationklue_study_mainklue_study_mmnlklue_study_mmnl_corrklue_study_recoveryklue_study_sampleklue_study_unbalancedmake_dgp_configrun_clustering_comparisonrun_concomitant_analysisrun_convergence_ablationrun_correlated_mmnl_robustnessrun_design_comparisonrun_full_studyrun_initialisation_ablationrun_lcmnl_workflowrun_main_simulationrun_mmnl_comparisonrun_sample_sensitivityrun_unbalanced_analysisrun_unconditional_recovery
Dependencies:apollobgwcliclustercodacodetoolsDerivdigestfuturefuture.applygenericsglobalsgluelatticelifecyclelistenvmagrittrMASSMatrixMatrixModelsmatrixStatsmaxLikmclustmcmcMCMCpackmiscToolsmnormtmvtnormnumDerivparallellypillarpkgconfigquantregrandtoolboxRcppRcppArmadilloRcppEigenrlangrngWELLRsolnprstudioapisandwichSparseMstringistringrsurvivaltibbletruncnormutf8vctrszoo
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| klue: Hybrid Machine Learning and Random-Utility Workflow for Latent Class Multinomial Logit Model Specification | klue-package |
| Run the full LCMNL specification workflow on a discrete-choice dataset | klue run_lcmnl_workflow |
| Build a canonical wide database from long- or wide-format input | build_database build_database_long build_database_wide klue_database klue_database_long klue_database_wide |
| Run a zero-setup demo of the klue workflow | klue_demo |
| Engine functions (advanced) | estimate_lcmnl_multistart estimate_mmnl estimate_mmnl_corr klue_dgp klue_lcmnl klue_mmnl klue_mmnl_corr klue_mmnl_defaults make_dgp_config |
| Simulate panel discrete-choice data | generate_data generate_data_defficient generate_data_with_covariates klue_simulate klue_simulate_cov klue_simulate_deff |
| Replicate the Monte Carlo simulation study from Frings (2026) | klue_study klue_study_clustering klue_study_concomitant klue_study_convergence klue_study_design klue_study_initialisation klue_study_main klue_study_mmnl klue_study_mmnl_corr klue_study_recovery klue_study_sample klue_study_unbalanced run_clustering_comparison run_concomitant_analysis run_convergence_ablation run_correlated_mmnl_robustness run_design_comparison run_full_study run_initialisation_ablation run_main_simulation run_mmnl_comparison run_sample_sensitivity run_unbalanced_analysis run_unconditional_recovery |