Learn R Programming

pECV (version 1.0.1)

generate_binary_data: Generate binary data example

Description

Generate simulated data from a binary (logistic) factor model.

Usage

generate_binary_data(n = 100, p = 50, q = 3)

Value

A named list with components:

resp

Binary matrix (n x p). Generated 0/1 responses.

true_q

Integer. True number of factors used in simulation.

theta_true

Numeric matrix (n x q). True latent factor scores.

A_true

Numeric matrix (p x q). True factor loadings.

d_true

Numeric vector (length p). Item intercepts.

Arguments

n

Integer. Number of observations.

p

Integer. Number of variables.

q

Integer. True number of latent factors.