fx_default_fxGeom_trans: Effex Functions: Default of 'fxGeom_trans'

Description Usage Arguments Mechanism See Also Examples

Description

The default transformation is determined in a manner that is sensitive to skewness. Skewed distribution are often hard to interpret if the axes are not transformed.

Usage

1
2
3
fx_default_fxGeom_trans(data, mf = metaframe(fx_default(data)),
  fxGeom_trans_simple = TRUE, fxGeom_trans_p.threshold = 0.01,
  custom_fun = default_identity)

Arguments

data

A data frame

mf

The metaframe. The metaframe of data is set as default.

fxGeom_trans_simple

logical should all boxcox and modulus transformations be allowed or should they be restricted to "identity", "sqrt" and "log10"?

fxGeom_trans_p.threshold

a value between 0 and 1. How low does the p-value of the moments::agostino.test() have to be to make another transformation necessary? A rather low value is recommended.

Mechanism

This function has two different modi: fxGeom_trans_simple = TRUE/FALSE. TRUE means that the only possible transformations are "identity", "sqrt" and "log10". FALSE, on the other hand, allows for the entire range of boxcox transformations.

Non-numeric data is always assigned "identity".

If fxGeom_trans_simple is true, the skewness of the three transformation is compared and the lowest absolute skewness wins. If there is nonpositive numeric data, "identity" is chosen by default.

If fxGeom_trans_simple is false, the procedure consists of severals steps:

See Also

scales::boxcox_trans()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
set.seed(1)
norm <- rnorm(1000)
square <- norm^2
exp <- exp(norm)
df <- dplyr::tibble(
  norm = rnorm(100),
  square = rnorm(100)^2,
  exp = exp(rnorm(100)),
  chars = rep("a", 100)
)
fx_default_fxGeom_trans(df)
fx_default_fxGeom_trans(df, fxGeom_trans_simple = FALSE)

sflippl/tectr documentation built on May 6, 2019, 8:51 a.m.