# Simulate response data with 3 items and varying categories
set.seed(123)
resp <- data.frame(
item1 = sample(1:3, 10, replace = TRUE),
item2 = sample(c(0, 5, 10), 10, replace = TRUE),
item3 = sample(1:2, 10, replace = TRUE)
)
# Apply adjustment
adjusted <- adjust.response(resp)
# Inspect results
str(adjusted)
print(adjusted$poly.orig) # Original category values
print(adjusted$response) # Standardized responses
Run the code above in your browser using DataLab