simulate_congeneric: Simulate observations from a congeneric one-factor model.

View source: R/simulations.R

simulate_congenericR Documentation

Simulate observations from a congeneric one-factor model.

Description

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.

Value

Covariance matrix.


alphaci documentation built on May 29, 2024, 8:55 a.m.