plot of an empirical cumulative distribution function (was Percentile plot)

前端 未结 2 1453
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 19:16

How can I generate a plot like the following in R.

\"enter

It shows the perce

2条回答
  •  余生分开走
    2020-12-19 19:53

    Methinks you want a plot of an empirical cumulative distribution function.

    So take a look at the documentation for ecdf() as well as the more featureful Ecdf() in the CRAN package Hmisc.

    Hmisc Ecdf example: ExecTm array of execution times, HttpProvCall array of time it took to call 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

提交回复
热议问题