Skip to contents

Simulate the school population data set

Usage

make_population(
  model_no = 1,
  seed = 123,
  H1 = FALSE,
  return_all = FALSE,
  Sigma2_attr = FALSE
)

Arguments

model_no

(integer) Choose from 1–5. See pkgdown articles for details.

seed

(numeric) The random seed.

H1

(logical) Are we generating a data to misspecify the true model? For power simulations.

return_all

(logical) Return the underlying latent variables (\(y^*\) and \(\eta\)) as well? well?

Sigma2_attr

(logical) Should the population Sigma2 matrix be computed and stored as an attribute?

Value

A tibble() containing ordinal binary values (0/1) for the items, as well as the population stratum and clusters (type, school, class).

Examples

if (FALSE) { # \dontrun{
make_population(1)
} # }