FACTOR · NOISY MEASUREMENTS
Factor
300 observations with 400 X measurements and 500 M measurements. Three latent covariates and two latent mediators generate the observations. This single linear DGP can be used with either Linear factor or MediEncoder.
Data-generating model
The factor errors e_M, outcome error e_Y, loadings L_X and L_M, and measurement errors E_X and E_M use independent standard-normal draws. Each observation has independent measurement errors. X and M in the CSV are the noisy measurements; the latent variables are not supplied to the estimator.
Known effects
| Target | NIE | NDE | TE |
|---|---|---|---|
| Loading true effects… | |||
The conditional target averages over the generated latent covariates and integrates the mediator/outcome errors. The population target also averages over the covariate distribution. A single fitted estimate need not equal either truth.
Run the example
- Load Factor and confirm the variable roles.
- Answer Noisy measurements, then choose Linear factor or MediEncoder.
- Dimensions default to Cumulative explained variance (50% by default; 10% to 95% in 5% steps, plus 99%), with Eigenvalue ratio also available. Counts are computed from the CSV, not copied from the known simulation truth. Since X is high-dimensional, both blocks get a factor representation. With low-dimensional X, only M is represented by factors.
- Enable Bootstrap Uncertainty to refit resampled observations. Enable Sensitivity to latent dimensions to compare dimension choices. The primary result retains bootstrap intervals; the sensitivity grid compares point estimates.
Reproduce
Save both Python files together and run with NumPy installed:
Seed: 2026091801. The fixed CSV and manifest record the original draw and its checksum. This is a simulation for exercising the analysis workflow; a single run does not establish estimator accuracy or coverage.