You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a breaking change - update code that accesses parameters by name
New Features
Simulation functions: Added simulate_lca() and simulate_lca_dk() to generate data from known parameters for validation studies
Parameter recovery validation: Added validate_recovery() for Monte Carlo validation of parameter estimates
Comprehensive validation tests: New test files for parameter recovery, individual-level functions, and group adjustments
Example Migration
# Old coderesult$params["lgk", ]
result$params[c("lgg", "lgk", "lkk"), ]
# New coderesult$params["gk", ]
result$params[c("gg", "gk", "kk"), ]
version 0.4.0 2026-04-05
Breaking Changes
DK model parameter names fixed: Parameter names in the Don't Know model now match the likelihood function:
Old: lgg, lgk, lgc, lkk, lcg, lck, lcc, gamma
New: lgg, lgk, lgd, lkg, lkk, lkd, ldd, gamma
This affects lca_cor() output when using DK data
Improvements
Named parameter access: All internal code now uses named row access (e.g., params["gamma", ]) instead of numeric indices, making the code more readable and robust to parameter reordering
GOF functions fixed: fit_model(), fit_dk(), and fit_nodk() now use formulas consistent with the likelihood function
lca_adj improved: Person-level adjustment function now correctly handles both DK and non-DK models with proper parameter names
Model criticism functions: cell_probs() and calculate_expected_values() now use correct DK model formulas
Bug Fixes
DK model cell probabilities: Fixed formulas in cell_probs() to match the likelihood function exactly
Expected values calculation: Fixed DK model expected values in calculate_expected_values()
version 0.3.0 2026-03-30
New Features
Comprehensive Econometric Correctness Test Suite: Added extensive validation tests covering likelihood derivation, parameter identification, standard error computation, and parameter recovery across various sample sizes and true parameter configurations
Bug Fixes
Chi-square GOF test: Fixed argument handling for chi-square goodness-of-fit test
Expected values formula: Corrected expected values computation in model fitting
Testing
Simulation helpers: Added helper-simulation.R with reusable functions for parameter recovery testing
Expanded test coverage: 612 tests (up from ~275 in v0.2.2), 7 skipped (extended tests)
New test modules:
test-econometric-formula-derivation.R: Validates likelihood formula components