Questions tagged [ecdf]

Empirical Cumulative Distribution Function in statistics

For definition please see its Wikipedia page.

In software, a built-in function ecdf takes a vector of samples and generates its ECDF. It is also easy to produce it ourselves, as given in this example: How to derive an ecdf function?

162 questions
0
votes
2 answers

Generating CDF Graphs using Seaborn

I am trying to plot a CDF graph for my code using Seaborn but can't get it to work. Specifically, I want to generate CDF graphs for sum_MDA, sum_CLA, sum_BIA and grand_total after I have simulated the entire code 1000 times. My code is as follows…
EarlofMar
  • 114
  • 3
  • 12
0
votes
1 answer

How do you implement ECDF in Python?

I'm trying to implement the empirical distribution function from a paper that has the MATLAB implementation on page 3. Here's my Python version of it. I converted it according to the NumPy for MATLAB users documentation while taking into account…
user2398046
0
votes
0 answers

What does ECDF in the Python statsmodels api return?

The statsmodels API says Returns empirical CDF as a step function. That's a mathematical statement. In terms of Python variables and data structures what is the ECDF as a step function? Is it a tuple, list, array, scalar, etc.?
user2398046
0
votes
0 answers

Different percentiles using ecdf() and plyr::percent_rank()

I've been trying to calculate percentiles on a fairly large number of observations. I came across two different ways of calculating the percentiles. Since I am working on a panel data set I would like to group the percentiles per time period. To…
hannes101
  • 2,410
  • 1
  • 17
  • 40
0
votes
1 answer

R: ecdf with bars instead of line

Is it possible to plot the ecdf function in R with bars instead of a line ore steps? Ore is there another way to plot the cumulative histogram in ggplot with cumulative densities on the y-axis instead of frequencys?
Hark
  • 115
  • 1
  • 11
0
votes
1 answer

coloring ggplot2's stat_ecdf lines based sample delimiter

I have a data.frame which I'd like to draw edcf lines. There are approximately 96 pos ecdf lines and 96 neg ecdf lines. I'd like to color the pos lines black and the neg lines red. I'd also like to add a level of transparency, or an average line, so…
user2117258
  • 515
  • 4
  • 18
0
votes
1 answer

Plotting distribution intervals of a ecdf

this is the first example of the ecdf() function in R: F10 <- ecdf(rnorm(10) plot(F10) plot(F10, verticals = TRUE, do.points = FALSE) Now I would like to "zoom" in the y-axis so that it only shows the interval of 0.9-1.0. Does anybody know how to…
M. Weeker
  • 140
  • 2
  • 10
0
votes
1 answer

R: Turn a [KDE] density plot into a cdf?

Data: 34,46,47,48,52,53,55,56,56,56,57,58,59,59,68 Density Plot ECDF What I'd like to do is take the derived density plot and turn it into a cumulative distribution frequency to derive %'s from. And vice versa. My hope is to use the kernel…
thistleknot
  • 1,098
  • 16
  • 38
0
votes
1 answer

getting empirical distribution of a variable in matlab?

I am trying to get the empirical distribution of two different series, p and q. I used the syntax [f1,x]=ecdf(p) and [f2,x]=ecdf(q). Although these are two completely different series, they produce the same values for f1 and f2. I guess it is…
indu mann
  • 63
  • 8
0
votes
1 answer

Line markers (pch) are not shown for big datasets using R plot command

I am able to plot data and and everything seems to work. The only problem is that R seems to decide if line markers are inserted or not. I have several different datasets, for the dataset with 1500 the plot works fine and I can see the markers. Any…
0
votes
1 answer

R interpolate column of data.table

I am trying to interpolate the exceedance probability between 2 time series, the time is not important here. data1<-c(10,11,12,13,14,15) data2<-c(20,21,22,23,24,25) x<-c(1,2) elevation<-c(10,11,20,24,25) elevation<-data.table(elevation) Where x[1]…
Jeff Tilton
  • 1,256
  • 1
  • 14
  • 28
0
votes
1 answer

geom_errorbar with ecdf in ggplot

I want to create an ecdf plot with two lines and I would like to add errorbars to one of them. I am using this code x <- c(16,16,16,16,34,35,38,42,45,1,12) xError <- c(0,1,1,1,3,3,3,4,5,1,1) y <- c(16,1,12) length(x) length(xError) length(y) df <-…
s.mustav
  • 3
  • 2
0
votes
1 answer

Cannot produce ggplot2 in Shiny

Below is my code. I am able to produce the ecdf plots in R studio but not when i put it all together in a shiny app like I have below: Server.R library(shiny) library(ggplot2) shinyServer(function(input, output) { datasetInput <- reactive({ …
Malik
  • 71
  • 1
  • 9
0
votes
1 answer

How fit a point on a ecdf curve

I have a random serie of values, a <- runif(1000, 0, 10), and a single value: b <- 1.5 . I want to plot the ecdf, and put on it the value to see the probability to have it. But when i do that: plot(ecdf(a)) points(b, col = 'red', lwd = 2) The…
0
votes
1 answer

how to make a cdf plot smoother and label y axis

I read parameters "data1" and "data2" from files and use this code to plot cdf but I have two problems: make the figure smoother label Y axis to CDF Please notice that this code is correct but I need some modifications. df <- data.frame(x =…
user3415921
  • 31
  • 2
  • 9
1 2 3
10
11