Description Usage Arguments Value Examples

`sim_lvm`

can simulate data based on factor analysis or
item response models with different response formats (continuous or categorical),
loading patterns and residual covariance (local dependence) structures.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |

`N` |
Sample size. |

`K` |
Number of factors. |

`ipf` |
Items per factor. |

`cpf` |
Cross-loadings per factor. |

`lam` |
Number of formal iterations for posterior sampling. |

`lac` |
Number of iterations to update the sampling information. |

`phi` |
Homogeneous correlations between any two factors. |

`ph1` |
Correlation between factor 1 and 2 (if it's different from |

`ecr` |
Residual correlation (local dependence). |

`ome_out` |
Output factor score or not. |

`cati` |
The set of categorical (polytomous) items in sequence number (i.e., 1 to |

`noc` |
Number of categories for categorical items |

`misp` |
Proportion of missingness. |

`rseed` |
An integer for the random seed. |

`necw` |
Number of within-factor local dependence. |

`necb` |
Number of between-factor local dependence. |

`add_ind` |
(Additional) minor factor with cross-loadings. |

`add_la` |
Value of cross-loadings on (Additional) minor factor. |

`add_phi` |
Correlations between (Additional) minor factor and other factors. |

`zero_it` |
Surplus items with zero loading. |

`digits` |
Number of significant digits to print when printing numeric values. |

An object of class `list`

containing the data, loading, and factorial correlation matrix.

1 2 3 4 5 6 7 8 9 10 11 | ```
# for continuous data with cross-loadings and local dependence effect .3
out <- sim_lvm(N=1000,K=3,ipf=6,lam = .7, lac=.3,ecr=.3)
summary(out$dat)
out$MLA
out$ofd_ind
# for categorical data with cross-loadings .4 and 10% missingness
out <- sim_lvm(N=1000,K=3,ipf=6,lam = .7, lac=.4,cati=-1,noc=4,misp=.1)
summary(out$dat)
out$MLA
out$ofd_ind
``` |

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.