Simulates Likert scale item responses based on a specified number of response categories and the centered parameters of the latent variable.
Arguments
- n_levels
number of response categories for the Likert scale item.
- cp
centered parameters of the latent variable. Named vector including mean (
mu
), standard deviation (sd
), and skewness (skew
). Skewness must be between -0.95 and 0.95.
Details
The simulation process uses the following model detailed by Boari and Nai-Ruscone. Let \(X\) be the continuous variable of interest, measured using Likert scale questions with \(K\) response categories. The observed discrete variable \(Y\) is defined as follows: $$ Y = k, \quad \text{ if } \ \ x_{k - 1} < X \leq x_{k} \quad \text{ for } \ \ k = 1, \dots, K $$ where \(x_{k}\), \(k = 0, \dots, K\) are endpoints defined in the domain of \(X\) such that: $$ -\infty = x_{0} < x_{1} < \dots < x_{K - 1} < x_{K} = \infty. $$ The endpoints dictate the transformation of the density \(f_{X}\) of \(X\) into a discrete probability distribution: $$ \text{Pr}(Y = k) = \int_{x_{k - 1}}^{x_{k}} f_{X}(x) \, dx \quad \text{ for } \ \ k = 1, \dots, K. $$
The continuous latent variable is modeled using a skew normal distribution.
The function simulate_likert
performs the following steps:
Ensures the centered parameters are within the acceptable range.
Converts the centered parameters to direct parameters.
Defines the density function for the skew normal distribution.
Computes the probabilities for each response category using optimal endpoints.
References
Boari, G. and Nai Ruscone, M. (2015). A procedure simulating Likert scale item responses. Electronic Journal of Applied Statistical Analysis 8(3), 288–297. doi:10.1285/i20705948v8n3p288
See also
discretize_density
for details on how to calculate
the optimal endpoints.
Examples
cp <- c(mu = 0, sd = 1, skew = 0.5)
simulate_likert(n_levels = 5, cp = cp)
#> 1 2 3 4 5
#> 0.15995244 0.29511214 0.28435807 0.18964493 0.07093241
cp2 <- c(mu = 1, sd = 2, skew = -0.3)
simulate_likert(n_levels = 7, cp = cp2)
#> 1 2 3 4 5 6 7
#> 0.08311645 0.07169556 0.07928979 0.08940184 0.10477572 0.13413804 0.43758260