# Description of project files
## Simulation R scripts
Simulation study scripts are of the form: `sim_XX_????.R`, where `XX` is a simulation code, and `???` is a vague description of the study. Each such simulation script has a companion "process" file: `sim_XX_????_process.R`, that processes the simulation study results and produce the graphs used to understand the study results.
We match `XX` to the study in the paper below:
- `06`: Study 1, log-correlation method across various conditions
- `05`: Study 2, ordinal items study
- `03`: Study 3, misspecification modeling study
- `09`: Appendix study 1 (frequentist)
- `10`: Appendix study 2 (Bayesian)
## Demonstration script
See `demo_mulaik.R` (example 1) and `demo_harmann.R` (example 2) for the demonstration scripts, which make use of the [minorbsem](https://github.com/jamesuanhoro/minorbsem) package.
## Stan scripts
There are several Stan scripts used in the simulation and data demonstration. They are:
1. `cfa_resid_r.stan`: Log-correlation script used across all studies
2. `cfa_resid_r_lo_res.stan`: Log-correlation script used in the data demonstration, allows for constraining loadings in specific ways
## Additional files
All simulation scripts require `g_inv_fx.R` to run, as it contains the relevant log-correlation transformation functions -- it is better to use the some of the functions (`*_spd()`) in `g_inv_spd_fx.R` instead, as these are much faster (> 30 times).
Finally, there is `some_empirical_dist.R`, which contains the code for the basic experiment showing multivariate normality of the transformed unbounded vector.