Skip to contents

Creates a table to calculate scores in specified standardized scale for each discrete raw score. Uses normalization provided by FrequencyTable() and scale definition created with StandardScale().

After creation it can be used to normalize and standardize raw scores with normalize_score() or normalize_scores_df().

plot.ScoreTable() method requires ggplot2 package to be installed.

Usage

ScoreTable(ft, scale)

# S3 method for ScoreTable
print(x, ...)

# S3 method for ScoreTable
plot(x, scale_name = NULL, ...)

Arguments

ft

a FrequencyTable object

scale

a StandardScale object or list of multiple StandardScale objects

x

a ScoreTable object

...

further arguments passed to or from other methods

scale_name

if scores for multiple scales available, provide the name of the scale for plotting.

Value

object of class ScoreTable. Consists of:

  • table: data.frame containing for each point in the raw score:

    • number of observations (n),

    • frequency in sample (freq),

    • quantile (quan),

    • normalized Z-score (Z),

    • score transformed to every of provided StandardScales

  • status: list containing the total number of simulated observations (n) and information about raw scores range completion (range): complete or incomplete

  • scale: named list of all attached StandardScale objects \

Examples

# firstly compute FrequencyTable for a variable
ft <- FrequencyTable(HEXACO_60$HEX_A)
#>  There are missing raw score values between minimum and maximum raw scores.
#>   They have been filled automatically.
#>   No. missing: 2/34 [5.88%]

# then create a ScoreTable
st <- ScoreTable(ft, STEN)

# ScoreTable is ready to use!
st
#> <ScoreTable>
#> computed on 204 observations
#> Attached <StandardScale> object(s):
#>sten: `M`: 5.5; `SD`: 2; `min`: 1; `max`: 10