Giter VIP home page Giter VIP logo

Comments (2)

lebebr01 avatar lebebr01 commented on July 18, 2024 1

This is great added context. May seem superfluous given the usage of the data within R, but I really like the flow this adds to the paper.

from performance.

rempsyc avatar rempsyc commented on July 18, 2024

Here are the revised sections (updated on the JOSE branch), in which we now describe the dataset used as well as the results of the analyses:

Below we provide example code using the mtcars dataset, which was extracted from the 1974 Motor Trend US magazine. The dataset contains fuel consumption and 10 characteristics of automobile design and performance for 32 different car models (see ?mtcars for details). We chose this dataset because it is accessible from base R and familiar to many R users. We might want to conduct specific statistical analyses on this data set, say, t tests or structural equation modelling, but first, we want to check for outliers that may influence those test results.

Because the automobile names are stored as column names in mtcars, we first have to convert them to an ID column to benefit from the check_outliers() ID argument. Furthermore, we only really need a couple columns for this demonstration, so we choose the first four (mpg = Miles/(US) gallon; cyl = Number of cylinders; disp = Displacement; hp = Gross horsepower). Finally, because there are no outliers in this dataset, we add two artificial outliers before running our function.

library(performance)
outliers <- check_outliers(data, method = "zscore_robust", ID = "car")
outliers

What we see is that check_outliers() with the robust z score method detected two outliers: cases 33 and 34, which were the observations we added ourselves. They were flagged for two variables specifically: mpg (Miles/(US) gallon) and cyl (Number of cylinders), and the output provides their exact z score for those variables.

We describe how to deal with those cases in more details later in the paper, but should we want to exclude these detected outliers from the main dataset, we can extract row numbers using which() on the output object, which can then be used for indexing: [...]

from performance.

Related Issues (20)

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.