qTreat.data.frame {COINr}R Documentation

Quick outlier treatment of a data frame

Description

A simplified version of Treat() which allows direct access to the default parameters. This has less flexibility, but is an easier interface and probably more convenient if the objective is to use the default treatment process but with some minor adjustments.

Usage

## S3 method for class 'data.frame'
qTreat(x, winmax = 5, skew_thresh = 2, kurt_thresh = 3.5, f2 = "log_CT", ...)

Arguments

x

A numeric data frame

winmax

Maximum number of points to Winsorise for each column. Default 5.

skew_thresh

Absolute skew threshold - default 2.

kurt_thresh

Kurtosis threshold - default 3.5.

f2

Function to call if Winsorisation does not bring skew and kurtosis within limits. Default "log_CT".

...

arguments passed to or from other methods.

Details

This function treats each column in x using the following process:

The arguments of qTreat() are passed to Treat().

See Treat() documentation for more details, and vignette("treat").

Value

A list

Examples

# select three indicators
df1 <- ASEM_iData[c("Flights", "Goods", "Services")]

# treat data frame, changing winmax and skew/kurtosis limits
l_treat <- qTreat(df1, winmax = 1, skew_thresh = 1.5, kurt_thresh = 3)

# Now we check what the results are:
l_treat$Dets_Table


[Package COINr version 1.1.14 Index]