make_likert_thresholds: Generate Likert-Style Threshold Patterns

View source: R/make_likert_thresholds.R

make_likert_thresholdsR Documentation

Generate Likert-Style Threshold Patterns

Description

Convenience helper to build per-item thresholds for the latent normal scale used by sample_size_EGA_montecarlo() when data_type = "ordinal". Useful for simulating realistic Likert scenarios with floor or ceiling effects rather than the unrealistic equiprobable default.

Patterns are parameterized via a Beta distribution over the latent cumulative scale: shape1 = shape2 = 1 gives equiprobable categories, shape1 < shape2 concentrates mass on lower categories (floor), shape1 > shape2 concentrates mass on upper categories (ceiling).

Usage

make_likert_thresholds(
  n_items,
  categories,
  pattern = c("equiprobable", "floor", "ceiling", "mixed", "custom"),
  shape1 = NULL,
  shape2 = NULL,
  seed = NULL
)

Arguments

n_items

Integer number of items.

categories

Integer number of ordinal response categories (>= 2).

pattern

One of "equiprobable", "floor", "ceiling", "mixed" (half of items floor, half ceiling, shuffled), or "custom".

shape1

First Beta shape parameter, used when pattern = "custom". Ignored otherwise.

shape2

Second Beta shape parameter, used when pattern = "custom". Ignored otherwise.

seed

Optional integer seed for the shuffling step in pattern = "mixed".

Value

A list of length n_items, each element a numeric vector of categories - 1 thresholds on the standard normal scale.

Examples

# 18 items, 5 categories, all with floor effect
tau_floor <- make_likert_thresholds(18, 5, "floor")
tau_floor[[1]]

# Half floor, half ceiling, randomly interleaved
tau_mixed <- make_likert_thresholds(18, 5, "mixed", seed = 1)

# Custom skew via Beta(1.5, 4)
tau_custom <- make_likert_thresholds(18, 5, "custom",
                                      shape1 = 1.5, shape2 = 4)

InterconectaR documentation built on Oct. 16, 2026, 1:06 a.m.