Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

standardize

Standardize values of an scdf file


Description

This function scales the measured values of an scdf file. It allows for mean centering and standardization based on each single-case data set or a scaling across all cases included in an scdf.

Usage

standardize(
  data,
  var,
  center = TRUE,
  scale = FALSE,
  m = 0,
  sd = 1,
  grand = TRUE
)

Arguments

data

A single-case data frame. See scdf to learn about this format.

var

A character string or a vector of character strings with variable names that should be scaled.

center

If set TRUE, data are mean centered.

scale

If set TRUE, the standard deviation is set.

m

The target mean for centering.

sd

The target standard deviation for scaling

grand

If set TRUE, scaling is based on the mean and standarddeviation of all measurements across all single-cases within the scdf.

Value

An scdf with the scaled values.

Author(s)

Juergen Wilbert

See Also

Other data manipulation functions: fill_missing(), longSCDF(), outlier(), ranks(), shift(), smooth_cases(), truncate_phase()

Examples

## Standardize a multiple case scdf and compute an hplm
ex_sc <- standardize(exampleAB_50, var = "values", center = TRUE, scale = TRUE)
hplm(ex_sc)

scan

Single-Case Data Analyses for Single and Multiple Baseline Designs

v0.51
GPL
Authors
Juergen Wilbert [aut, cre], Timo Lueke [aut]
Initial release
2021-2-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.