questionnaire_gen_family: Generation of ordinal and continuous variables

View source: R/questionnaire_gen_family.R

questionnaire_gen_familyR Documentation

Generation of ordinal and continuous variables

Description

Creates a data frame of discrete and continuous variables based on a latent correlation matrix and marginal proportions.

Usage

questionnaire_gen_family(
  n_obs,
  cat_prop,
  cov_matrix,
  family = "gaussian",
  theta = FALSE,
  mean_yx = NULL,
  n_cats
)

Arguments

n_obs

number of observations to generate.

cat_prop

list of cumulative proportions for each item.

cov_matrix

covariance matrix. between the latent trait (Y) and the background variables (X and Z).

family

distribution of the background variables. Can be NULL or 'gaussian'.

theta

if TRUE will label the first continuous variable 'theta'.

mean_yx

vector with the means of the latent trait (Y) and the continuous background variables with flexible variance (X).

n_cats

vector with number of categories for each W.


lsasim documentation built on Aug. 22, 2023, 5:09 p.m.