Simulate observations from a one-factor model with specified latent variable
and error variable distributions. The error terms are not correlated,
hence the model is congeneric.
Usage
simulate_congeneric(
n,
k,
sigma = 1,
lambda = 1,
latent = stats::rnorm,
error = stats::rnorm
)
Arguments
- n
Number of observations.
- k
Size of matrix or number of testlets.
- sigma
Vector of error standard deviations.
Repeated to have k
elements.
- lambda
Vector of factor loadings. Repeated to have k
elements.
- latent
Distribution of the latent variable.
- error
Distribution of the error variable.