Skip to contents

Make latent variable indicators with rbeta_ms function

Usage

make_indicators(
  latent,
  indicators = NULL,
  mu = 0.8,
  sigma = 0.05,
  k = 3,
  digits = 3
)

Arguments

latent

name of latent variable

indicators

vector of indicator names (assigned automatically if left NULL)

mu

mean of standardized coefficients

sigma

sd of standardized coeficients

k

number of indicator variables

digits

number of digits to round coefficients

Value

lavaan code for latent variable assignment

Examples

make_indicators("depression", mu = 0.8, sigma = 0.05, k = 4)
#> [1] "depression =~ 0.741 * depression_1 + 0.856 * depression_2 + 0.872 * depression_3 + 0.718 * depression_4"