Giter VIP home page Giter VIP logo

outlierstests's Introduction

outliersTests

Travis build status

The R package for test proposed in article Multiple outlier detection tests for parametric models.

The purpose of outliersTests is to provide statistical tests for absence of outliers hypothesis for various location-scale families of distributions and give procedures for outlier identification when the hypothesis is rejected. Normal, logistic, Cauchy, Laplace, Gumbel families are included. In the case of shape-scale families such as Weibull, lognormal or loglogistic it is sufficient to take logarithms of observations and apply all procedures for Gumbel, normal or logistic families, respectively.

Key features:

  • The most important functions: bp_test, get_robust_estimates.

Installation

To get the current development version from github:

# install.packages("devtools")
devtools::install_github("linas-p/outliersTests")
library(outliersTests)

Usage

Most simple usage just call method bp_test:

bp_test(example1, alternative = "greater", pvalue = TRUE)

For specified data more parameters can be indicated:

set.seed(12)
x <- rcauchy(100)
ks.test(x, "pcauchy") # check cauchy distribution
x[12:22] <- 500
ks.test(x, "pcauchy") # check cauchy, not cauchy data
bp <- bp_test(x, alternative = "greater", distribution = "cauchy", pvalue = TRUE)
bp
x_after <- x[!bp$outlier]
ks.test(x_after, "pcauchy") # check cauchy, after outliers removal data cauchy again

The documentation of the usage is accesible as:

?outliersTests # main description of package
?bp_test # documentation for the usage of the BP test

Most simple usage for regression just call method BP_regression_test:

set.seed(12)
x <- 1:100
y <- 2 + 2*x + rnorm(100)
y[2:5] <- 10

estimates <- get_betas(x, y)
estimates

BP_regression_test(estimates$ri)

Cite:

Bagdonavičius, V.; Petkevičius, L. Multiple Outlier Detection Tests for Parametric Models. Mathematics 2020, 8, 2156.

Bagdonavičius, V., & Petkevičius, L. (2020). A new multiple outliers identification method in linear regression. Metrika, 83(3), 275-296.

or

 @article{bagdonaviciusmulti2020,
    title={Multiple Outlier Detection Tests for Parametric Models},
    author={Bagdonavičius, Vilijandas and Petkevičius, Linas},
    journal={Mathematics},
    volume={8},
    number={12},
    pages={2156},
    year={2020},
    publisher={Multidisciplinary Digital Publishing Institute}
  }

  @article{bagdonavivcius2020new,
    title={A new multiple outliers identification method in linear regression},
    author={Bagdonavi{\v{c}}ius, Vilijandas and Petkevi{\v{c}}ius, Linas},
    journal={Metrika},
    volume={83},
    number={3},
    pages={275--296},
    year={2020},
    publisher={Springer}
  }

outlierstests's People

Contributors

linas-p avatar

Stargazers

Liang Zhang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.