pomps() transforms scores to a 0-100 scale using the Percent of
Maximum Possible Scores method. This makes different scales directly
comparable regardless of their original range.
This is the R equivalent of the SPSS formula:
COMPUTE v81p = ((v81 - 1) / (7 - 1)) * 100.
A score of 0 means the minimum possible score, 100 means the maximum. The transformation preserves all correlations between variables.
Value
A numeric vector of the same length as x, with values
rescaled to the 0-100 range. The variable label of x is kept;
missing values (including the SPSS missing types of imported data)
become plain NA, as in an SPSS COMPUTE.
Details
Why Specify scale_min and scale_max?
By default, pomps() uses the observed minimum and maximum of your
data. However, for Likert scales you should specify the theoretical
range:
A 1-5 Likert scale:
scale_min = 1, scale_max = 5A 1-7 Likert scale:
scale_min = 1, scale_max = 7A 0-10 scale:
scale_min = 0, scale_max = 10
Using theoretical values ensures that the transformation is consistent
across samples and time points. Values outside the range (e.g. an
unrecoded "don't know" = 9 on a 1-5 scale) give scores below 0 or above
100; pomps() warns about them, so recode missing codes first.
See also
row_means for creating mean indices across items.
Other scale:
efa(),
reliability(),
row_count(),
row_means(),
row_sums()
Examples
library(dplyr)
data(survey_data)
# Transform a 1-5 Likert scale to POMPS
survey_data <- survey_data %>%
mutate(trust_gov_pomps = pomps(trust_government, scale_min = 1, scale_max = 5))
# Transform multiple variables with the same scale
survey_data <- survey_data %>%
mutate(across(
c(trust_government, trust_media, trust_science),
~ pomps(.x, scale_min = 1, scale_max = 5),
.names = "{.col}_pomps"
))
# Auto-detect range (uses observed min/max)
survey_data <- survey_data %>%
mutate(age_pomps = pomps(age))
