Learn R Programming

stenR (version 0.6.9)

ScoreTable: Create a ScoreTable

Description

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, ...)

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 \

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.

Examples

Run this code
# firstly compute FrequencyTable for a variable
ft <- FrequencyTable(HEXACO_60$HEX_A)

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

# ScoreTable is ready to use!
st

Run the code above in your browser using DataLab