Skip to content

Data Science Tutorials

  • Home
  • R
  • Statistics
  • Course
  • Machine Learning
  • Guest Blog
  • Contact
  • About Us
  • Toggle search form
  • similarity measure between two populations
    Similarity Measure Between Two Populations-Brunner Munzel Test Statistics
  • Control Chart in Quality Control
    Control Chart in Quality Control-Quick Guide Statistics
  • Error: Can't rename columns that don't exist
    Can’t rename columns that don’t exist R
  • best books about data analytics
    Best Books to Learn Statistics for Data Science Course
  • How to Scale Only Numeric Columns in R
    How to Scale Only Numeric Columns in R R
  • Algorithm Classifications in Machine Learning
    Algorithm Classifications in Machine Learning Machine Learning
  • How to Group and Summarize Data in R
    How to Group and Summarize Data in R R
  • Create new variables from existing variables in R
    Create new variables from existing variables in R R
Ogive Graph in R

Ogive Graph in R

Posted on February 26February 26 By Jim No Comments on Ogive Graph in R
Tweet
Share
Share
Pin

Ogive Graph in R, An ogive is a graph that displays the proportion of data values in a dataset that is above or below a particular value.

The following ogive graph in R is created using the instructions in this tutorial:

Ogive Graph in R

For instance, make an Ogive graph in R.

Let’s first define a dataset with 20 values:

put up a dataset

data <- c(5, 6, 7, 8, 9, 12, 14, 16, 16, 17, 20, 22, 25, 30, 34, 35, 38, 41, 43, 45)

Next, let’s make a straightforward ogive graph in R using the graph.freq() and ogive.freq() functions from the agricolae package:

library(agricolae)

Let’s define values to plot

value_bins <- graph.freq(data, plot=FALSE)
values <- ogive.freq(value_bins, frame=FALSE)

Let’s create an ogive chart

plot(values, xlab='Values', ylab='Relative Cumulative Frequency',
main='Ogive Chart', col='steelblue', type='b', pch=19, las=1, bty='l')

The y-axis displays the relative cumulative frequency of values that fall below the levels given on the x-axis while the x-axis displays values from the dataset.

Predictive Modeling and Data Science – Data Science Tutorials

The following describes how to interpret some of the plot() function’s more enigmatic arguments:

type=’b’: Plot both lines and points
pch=19: Fill in the circles in the plot
las=1: Make labels perpendicular to axis
bty=’l’: Only show the border on the bottom and left sides of the plot

We can view the actual values in the plot by printing the values created from the ogive.freq() function:

Now we can view the values in ogive

values
   x  RCF
1  5 0.00
2 13 0.30
3 21 0.55
4 29 0.65
5 37 0.80
6 45 1.00
7 53 1.00

Here’s how to interpret the values:

0% of all values in the dataset were less than or equal to 5.

30% of all values in the dataset were less than or equal to 13.

55% of all values in the dataset were less than or equal to 21.

65% of all values in the dataset were less than or equal to 29.

And so on.

Learn Hadoop for Data Science – Data Science Tutorials

Check your inbox or spam folder to confirm your subscription.

Tweet
Share
Share
Pin
R

Post navigation

Previous Post: Is R or Python Better for Data Science in Bangalore
Next Post: Top Data Modeling Tools for 2023

Related Posts

  • Algorithm Classifications in Machine Learning
    Algorithm Classifications in Machine Learning Machine Learning
  • R Percentage by Group Calculation
    R Percentage by Group Calculation R
  • How to Recode Values in R
    How to Recode Values in R R
  • Augmented Dickey-Fuller Test in R
    Augmented Dickey-Fuller Test in R R
  • Two-Way ANOVA Example in R
    How to perform a one-sample t-test in R? R
  • Two-Way ANOVA Example in R
    How to perform One-Sample Wilcoxon Signed Rank Test in R? R

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • About Us
  • Contact
  • Disclaimer
  • Guest Blog
  • Privacy Policy
  • YouTube
  • Twitter
  • Facebook
  • Defensive Programming Strategies in R
  • Plot categorical data in R
  • Top Data Modeling Tools for 2023
  • Ogive Graph in R
  • Is R or Python Better for Data Science in Bangalore

Check your inbox or spam folder to confirm your subscription.

  • Data Scientist Career Path Map in Finance
  • Is Python the ideal language for machine learning
  • Convert character string to name class object
  • How to play sound at end of R Script
  • Pattern Searching in R
  • How to Replace Inf Values with NA in R
    How to Replace Inf Values with NA in R R
  • Top Data Science Skills
    Top Data Science Skills- step by step guide Machine Learning
  • Extract patterns in R
    Extract patterns in R? R
  • Artificial Intelligence Examples
    Artificial Intelligence Examples-Quick View Course
  • The Multinomial Distribution in R
    The Multinomial Distribution in R R
  • Difference between R and Python
    Difference between R and Python R
  • Data Science Applications in Banking
    Data Science Applications in Banking Machine Learning
  • Add new calculated variables to a data frame and drop all existing variables
    Add new calculated variables to a data frame and drop all existing variables R

Copyright © 2023 Data Science Tutorials.

Powered by PressBook News WordPress theme