Checks multiple columns in a dataframe to see if each is normally distributed. If not, then box-cox transform

MultipleColumnsNormalCheckThenBoxCox(
  input.data,
  names.of.dependent.variables,
  alpha.for.shapiro,
  output.lambda.in.col.name = TRUE
)

Arguments

input.data

A dataframe.

names.of.dependent.variables

Vector of strings where each element is the name of a column to assess for normality and potentially transform.

alpha.for.shapiro

Numerical value from 0 to 1. Threshold for what is considered not normal. If p-value is less than this threshold, then the data is considered not normal.

output.lambda.in.col.name

Boolean indicating if the lambda used for boxcox should be included in the column name.

Value

A dataframe with the columns specified in names.of.dependent.variables.

See also