Skip to contents

Use computed FrequencyTable or ScoreTable to normalize the provided raw scores.

Usage

normalize_score(x, table, what)

Arguments

x

vector of raw scores to normalize

table

FrequencyTable or ScoreTable object

what

the values to get. One of either:

  • quan - the quantile of x in the raw score distribution

  • Z - normalized Z score for the x raw score

  • name of the scale calculated in ScoreTable provided to table argument

Value

Numeric vector with values specified in what argument

See also

Other score-normalization functions: normalize_scores_df(), normalize_scores_grouped(), normalize_scores_scoring()

Examples

# normalize with FrequencyTable
suppressMessages(
  ft <- FrequencyTable(HEXACO_60$HEX_H)
)

normalize_score(HEXACO_60$HEX_H[1:5], ft, what = "Z")
#> [1]  1.1993493  0.5918940 -1.9274661 -1.5859745 -0.2673292

# normalize with ScoreTable
st <- ScoreTable(ft, list(STEN, STANINE))

normalize_score(HEXACO_60$HEX_H[1:5], st, what = "sten")
#> [1] 8 7 2 2 5
normalize_score(HEXACO_60$HEX_H[1:5], st, what = "stanine")
#> [1] 7 6 1 2 4