Graph of the empirical cumulative distribution function (there was a Percentile graph)

How can I generate a graph similar to the following in R.

enter image description here

It shows the percentage of transactions (x) for a given response time (y), see my own answer below for my own use.

+3
source share
2 answers

Think that you need a graph of the empirical cumulative distribution function.

Therefore, check out the documentation for ecdf() , as well as the more functional ecdf() in the CRAN Hmisc package.

Example Hmisc Ecdf: ExecTm array, HttpProvCall array of time it took to call the downstream system, and we compare the time we spend with the downstream system with percentiles

 > library(Hmisc) > x <- c(ExecTm,ExecTm-HttpProvCall) > g <- c(rep('ExecTm',length(ExecTm)),rep('ExecTm-HttpProvCall',length(ExecTm))) > Ecdf(x, group=g, xlab='Test Results', + label.curves=list(keys=1:2),q=c(.90,.95,.98)) 

enter image description here

+14
source

y <- c (rnorm (8000, 300, 10), rnorm (400, 500, 300))

t2 <- quantile (y, probs = seq (0, 99.99, by = .1) / 100)

plot (t2, xlab = "promille", ylab = "time (ms)", pch = 20)

gives me:

enter image description here

whit my dataset

enter image description here

0
source

Source: https://habr.com/ru/post/890437/


All Articles