Stable lifecycle

These functions calculate the scores according to:

  • score_z: Normal(z) distribution

  • score_mad: Mean absolute deviation

  • score_t: t-distribution

  • score_chi: chi-distribution

score_z(x, na.rm = getOption("transx.na.rm"))

score_mad(x, na.rm = getOption("transx.na.rm"))

score_t(x, na.rm = getOption("transx.na.rm"))

score_chisq(x, na.rm = getOption("transx.na.rm"))

Arguments

x

[univariate vector]

Univariate vector, numeric or ts object with only one dimension.

na.rm

[logical(1): getOption("transx.na.rm")]

A value indicating whether NA values should be stripped before the computation proceeds.

Value

Returns a vector with the same class and attributes as the input vector.

Details

Because function are known with different names:

  • score_z is identical to std_mean

  • score_mad is identical to std_median

See also

Examples

x <- seq(-3,3,0.5) score_z(x)
#> [1] -1.5406578 -1.2838815 -1.0271052 -0.7703289 -0.5135526 -0.2567763 #> [7] 0.0000000 0.2567763 0.5135526 0.7703289 1.0271052 1.2838815 #> [13] 1.5406578
score_mad(x)
#> [1] -1.3489815 -1.1241513 -0.8993210 -0.6744908 -0.4496605 -0.2248303 #> [7] 0.0000000 0.2248303 0.4496605 0.6744908 0.8993210 1.1241513 #> [13] 1.3489815
score_t(x)
#> [1] -1.6469149 -1.3234774 -1.0296800 -0.7564749 -0.4971831 -0.2465228 #> [7] 0.0000000 0.2465228 0.4971831 0.7564749 1.0296800 1.3234774 #> [13] 1.6469149