preprocess.outliers {bnpa}R Documentation

Extract information of outliers

Description

This function receives a data set, the variable content and name, analyzes their content and extract outliers information, showing a boxplot and a histogram.

Usage

preprocess.outliers(data.to.work, variable.content, variable.name)

Arguments

data.to.work

is a data frame containing the variables.

variable.content

is a variable with all content of variable in the data set.

variable.name

is the name of variable to be verified.

Value

a list with number of outliers and the variable content

Author(s)

Elias Carvalho

References

GUJARATI, Damodar N. Basic econometrics. Tata McGraw-Hill Education, 2009.

Examples

# Clean environment
closeAllConnections()
rm(list=ls())
# Set enviroment
# setwd("to your working directory")
# Load packages
library(bnpa)
# Load data sets from package
data(dataQuantC)
# Set parameters to function
variable.content <- dataQuantC$A
variable.name <- "A"
# Preprocess information
preprocess.information <- preprocess.outliers(dataQuantC, variable.content, variable.name)
num.outliers <- preprocess.information[[1]]
variable.content <- preprocess.information[[2]]
mean.of.outliers <- preprocess.information[[3]]

[Package bnpa version 0.3.0 Index]