Skip to contents

$$X_i^* = (X_i - \mu)/\sigma$$ MVSML (2022) sec. 2.6 p.57. ddof = 1 is the sample standard deviation, matching the scale() the book's own examples call.

Usage

Zscnm(x, ddof = 1)

Arguments

x

Numeric vector to standardize.

ddof

Delta degrees of freedom of the standard deviation.

Value

Named list with estimate, x_std, mean, sd, n, method.

References

MVSML (2022) sec. 2.6 p.57.

Examples

Zscnm(c(1, 2, 3, 4))
#> $estimate
#> [1] 1.290994
#> 
#> $x_std
#> [1] -1.1618950 -0.3872983  0.3872983  1.1618950
#> 
#> $mean
#> [1] 2.5
#> 
#> $sd
#> [1] 1.290994
#> 
#> $n
#> [1] 4
#> 
#> $method
#> [1] "z-score standardization (MVSML 2022 p.57)"
#>