testTrans: testTrans

Description Usage Arguments Value Examples

Description

Test mathematical transformations (exp, log, square, cube) of predictor variables. For a set of dependent variables and independent variables testTrans will test the logarithmic, exponential, quadratic, and cubic relationships of the DV between each DV & IV and provide visual feedback to allow determination of the best fitting mathematical tranformation of each dependent variable for a given independent variable.

Usage

1
testTrans(dvs, ivs, dat)

Arguments

dvs

(character) The names of the dependent variables as a character vector

ivs

(character) The name of the indpendent variables as a character vector

dat

(data.frame) The data.frame that contains the variables

Value

list

of ggplot2 grobs showing the relationship of each variable to each other variable

Of note, the declaration of the best-fitting transformations for each relationship can be accessed via lapply(result, purrr::pluck,"labels","caption")

Examples

1
2
dat <- data.frame(y = rnorm(15,0,1),x = {rnorm(15,0,1) + rnorm(15,0,.02)})
testTrans("y", "x", dat)

yogat3ch/HDA documentation built on Sept. 13, 2019, 8:54 p.m.