Skip to contents

This function builds a simulated dataset and classifies individuals based on their change scores to see whether we can recover the changers from the true DGP.

Usage

detectChangers(
  n = 1000,
  t = 3,
  rate = 0.5,
  balance_dir = 0.5,
  balance_res = 0.5,
  strength = 0.5,
  reliable = 1,
  n_samples = 1000,
  verbose = TRUE
)

Arguments

n

The number of individuals in the DGP.

t

The number of time periods.

rate

The percent of individuals changing across the panel.

balance_dir

The direction of change, where 0 means all negative change, 1 means all positive change, and values in-between means the percentage of changers changing positively.

balance_res

The marginal distribution of the outcome (the percent distribution of 0s and 1).

strength

The strength of change in the latent variable.

reliable

The reliability score of the outcome measurement.

n_samples

The number of simulated datasets.

verbose

See progress messages in the console.

Value

A vector.