NormalCheckThenBoxCoxTransform: Checks if the data is normally distributed using Shapiro...

Description Usage Arguments Value See Also

View source: R/preprocessing.R

Description

Cannot use boxcox if data has zeroes. If data has zeros, then do this: Add 1 if most values are greater than 1, else if most of values <1, multiply 10 or 100, then add 1. Then do boxcox.

Usage

1
NormalCheckThenBoxCoxTransform(input.data, alpha.for.shapiro)

Arguments

input.data

A numerical data vector.

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.

Value

A List with 4 elements:

  1. If data is non-normal, then a vector of the transformed data is outputted. If data is normal, then this is NULL.

  2. If data is non-normal, then a number specifying the lambda used for boxcox is outputted. If data is normal, then this is NULL.

  3. P-value from the Shapiro test.

  4. Boolean indicating if boxcox transformation was performed.

See Also

Other Preprocessing functions: AddColBinnedToBinary(), AddColBinnedToQuartiles(), AddPCsToEnd(), ConvertDataToPercentiles(), CorAssoTestMultipleWithErrorHandling(), DownSampleDataframe(), GenerateElbowPlotPCA(), GeneratePC1andPC2PlotsWithAndWithoutOutliers(), Log2TargetDensityPlotComparison(), LookAtPCFeatureLoadings(), MultipleColumnsNormalCheckThenBoxCox(), RanomlySelectOneRowForEach(), RecodeIdentifier(), RemoveColWithAllZeros(), RemoveRowsBasedOnCol(), RemoveSamplesWithInstability(), SplitIntoTrainTest(), StabilityTestingAcrossVisits(), SubsetDataByContinuousCol(), TwoSampleTTest(), ZScoreChallengeOutliers(), captureSessionInfo(), correlation.association.test(), describeNumericalColumnsWithLevels(), describeNumericalColumns(), generate.descriptive.plots.save.pdf(), generate.descriptive.plots()


yhhc2/machinelearnr documentation built on Dec. 23, 2021, 7:19 p.m.