Data Simulation Based on Latent Factors
Overview
Generates data based on latent factor models. Data can be continuous, polytomous, dichotomous, or mixed. Skews, cross-loadings, wording effects, population errors, and local dependencies can be added. All parameters can be manipulated. Data categorization is based on Garrido, Abad, and Ponsoda (2011) doi:10.1177/0013164410389489.
- UPDATE: skew range supported by
categorize,simulate_factors, andsimulate_hierarchical_factorsexpanded from -2/2 to -10/10 (in increments of 0.05);skew_tablesregenerated over the new range - INTERNAL:
skew_generatorrewritten to compute skewness analytically from category counts instead of materializing asample_size-length vector and callingpsych::skew()on it (mathematically equivalent, since the moment-skewness formula only depends on counts per value); it also now searches adaptively overreduction_factorandsample_sizewhen the defaults can't reach a target skew directly, closing gaps (e.g., skew near zero forcategories >= 4) that were previously unreachable regardless of tolerance. Together, this cut full skew-table generation time from tens of minutes to about a second - FIX:
skew_generator's bisection search had a typo (limitinfinstead oflimitsinf) that left the lower search bound frozen at zero, which combined withskew(proportion)not being monotonic across its full domain, could prevent convergence even for reachable targets
From NEWS in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
Show 1 earlier changeHide 1 earlier change
- ERROR13 OK, 1 ERROR2026-03-10
Documentation
- Help pages
- 17includes a package overview page
- Examples that run
- 100%16 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 94%
- Return-value docs
- 100%
- Help pages citing references
- 76%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Commits over time
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/alexchristensen/latentfactor on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows
Dependencies
Installing latentFactoR adds 154 packages (79 with compiled code, 129 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
CRAN will archive these unless their check problems are fixed by the date shown. This package needs each one to install.
- mlrfix by Oct 26
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.0.9Latest
- 0.0.8
- RR 4.6.0 released · 2026-04-24
- 0.0.72025-11-03 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- unarchivedReturned to CRAN2024-04-18
- 0.0.6
- archivedRemoved from CRAN2023-10-13requires archived package 'BFpack'
- RR 4.3.0 released · 2023-04-21
- 0.0.42022-11-22 · diff ↗
- 0.0.32022-10-13 · diff ↗ ·
added 8 exports
EKC, NEST, add_cross_loadings, add_population_error, data_to_zipfs, estimate_dimensions, factor_forest, obtain_zipfs_parameters - 0.0.22022-09-09
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-09-09
- Total releases
- 7 / 4 yrs
- License
- GPL (>= 3.0)
- Copyright
- See inst/COPYRIGHTS for details
- Minimum R
- ≥ 3.6.0
- Bundled data
- 22 KB / 1 file
- Download size
- 130 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("latentFactoR")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.