| sf_scale | R Documentation |
Creates a scale definition that groups items and specifies how composite
scores are computed. The scale carries scoring rules used by score_scales()
and measurement structure used by reliability_report(), item_report(),
and cfa_syntax().
sf_scale(
id,
label,
items,
method = c("mean", "sum"),
min_valid = NULL,
reverse_items = NULL,
weights = NULL
)
id |
Character. A unique identifier for this scale. Referenced in the
|
label |
Character. A human-readable name for the scale, used in reports and codebooks. |
items |
Character vector. The |
method |
Character. Scoring method. Either |
min_valid |
Integer or NULL. The minimum number of non-missing items
required to compute a score for a respondent. When |
reverse_items |
Character vector or NULL. A subset of |
weights |
Numeric vector or NULL. Item weights for weighted scoring.
Must have the same length as |
An object of class sf_scale (a named list).
sf_item(), score_scales(), reliability_report()
sat_scale <- sf_scale(
id = "satisfaction",
label = "Customer Satisfaction",
items = c("sat_overall", "sat_speed", "sat_quality"),
method = "mean",
min_valid = 2,
reverse_items = NULL
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.