Learn R Programming

pECV (version 1.0.1)

generate_binary_data_miss: Generate binary data with missing values

Description

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

Usage

generate_binary_data_miss(n = 100, p = 50, q = 3, miss_prop = 0.05)

Value

A named list with components:

resp

Binary matrix (n x p). Generated 0/1 responses with missing values (NA).

resp_complete

Binary matrix (n x p). Complete data before missingness.

true_q

Integer. True number of factors used in simulation.

theta_true

Numeric matrix. True latent factor scores.

A_true

Numeric matrix. True factor loadings.

d_true

Numeric vector (length p). Item intercepts.

miss_prop

Numeric. Proportion of entries set to missing.

Arguments

n

Integer. Number of observations.

p

Integer. Number of variables.

q

Integer. True number of latent factors.

miss_prop

Numeric in (0,1). Proportion of missing values (default 0.05).