Take in a data frame containing circumplex scales, angle definitions for each scale, and normative data (from the package or custom) and return that same data frame with each specified circumplex scale transformed into standard scores (i.e., z-scores) based on comparison to the normative data.
norm_standardize(
data,
scales,
angles = octants(),
instrument,
sample = 1,
prefix = "",
suffix = "_z",
append = TRUE
)
A data frame that contains the norm-standardized versions of scales
.
Required. A data frame or matrix containing at least circumplex scales.
Required. A character vector containing the column names, or a numeric vector containing the column indexes, for the variables (scale scores) to be standardized.
Required. A numeric vector containing the angular displacement
of each circumplex scale included in scales
(in degrees). Can use the
octants()
, poles()
, or quadrants()
convenience functions.
Required. An instrument object from the package. To see the
available circumplex instruments, see instruments()
.
Required. An integer corresponding to the normative sample to
use in standardizing the scale scores (default = 1). See ?norms
to
see the normative samples available for an instrument.
Optional. A string to include at the beginning of the newly
calculated scale variables' names, before the scale name and suffix
(default = "").
Optional. A string to include at the end of the newly
calculated scale variables' names, after the scale name and prefix
(default = "_z").
Optional. A logical that determines whether the calculated
standardized scores should be added as columns to data
in the output or
the standardized scores alone should be output (default = TRUE).
Other tidying functions:
ipsatize()
,
score()
,
self_standardize()
data("jz2017")
norm_standardize(jz2017, scales = 2:9, instrument = iipsc, sample = 1)
Run the code above in your browser using DataLab