Description Usage Arguments Details Value Examples

This function takes a lavaan model with standardized parameters and simulates latent scores, errors, disturbances, and observed scores.

1 2 3 4 5 6 7 8 9 10 11 |

`m` |
Structural model represented by lavaan syntax |

`n` |
Number of simulated cases |

`observed` |
Include observed variables |

`latent` |
Include latent variables |

`errors` |
Include observed error and latent disturbances variables |

`factor_scores` |
Include factor score variables |

`composites` |
Include composite variables |

`matrices` |
Include matrices as attribute of tibble |

`...` |
Arguments passed to 'simstandardized_matrices' |

This function supports the '~' operator for regressions, the '~~' for covariances (but not variances), and the '=~' latent variable loadings. It does not support intercepts (e.g,. 'y ~ 1'), thresholds, scaling factors, formative factors, or equality constraints.

tibble with standardized data

1 2 3 4 5 6 | ```
library(simstandard)
# Lavaan model
m = "Latent_1 =~ 0.8 * Ob_1 + 0.7 * Ob_2 + 0.4 * Ob_3"
# simulate 10 cases
sim_standardized(m, n = 10)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.