VariableTransform: Transforms the data vector using the best possible...

Description Usage Arguments Details Value

View source: R/Transformations.R

Description

VariableTransform initially pads the data inorder to eliminates all negative and zero values and then categorizes the data into normal, positive skewed and negative skewed based on the skewness score of each column of the given data frame

Transformation for Positive skewed data:

Different transformation techiniques considered to transform positive skewed data are as follows:

Of all these techniques, Best technique is choosed based on the "ChooseBestTrans" argument provided.Default method will be Shapiro P-Value

Transformation for Negative skewed data:

Different transformation techiniques considered to transform negative skewed data are as follows:

Of all these techniques, Best technique is choosed based on the "ChooseBestTrans" argument provided.Default method will be Shapiro P-Value

Scaling the dataset:

After merging all the datasets created (normally distributed data, positive skewd data, neggative skewed data), entire dataset is normalized and stored in an other dataframe.

Usage

1
VariableTransform(data_col, best_trans_metric = "Shapiro P Value")

Arguments

data_col

Any continuous data vector that has to transformed into normal form

best_trans_metric

Considers the best transformation based on one of the three values ("Shapiro P Value", "Pearson P Value", "Min skewness")

Details

Takes in a data vector and performs the best possible transformation to each of the columns in the data frame

Value

Returns a list of 7 objects:

transformed_df

Tranformed Dataset for all Continuous variables

scaled_df

Scaled Dataset for all Continuous variables

original_dist

Distribution of the dataset provided

neg_skew_trans

Intermediate scores (for all the techniques) for Positive skewed data

pos_skew_trans

Intermediate scores (for all the techniques) for Positive skewed data

trans_fit_model

A list of model fit file, OrderNorm objects and tau_mat objects

complete_data

Combination of transformed continuous data and categorical data


akunuriYoshitha/BestTransform documentation built on Feb. 19, 2021, 3:23 a.m.