Skip to content

Weigted version of ggplot2 empirical cumulative distribution function (ECDF)

Notifications You must be signed in to change notification settings

capitantyler/stat_ecdf_weighted

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

stat_ecdf_weighted

Weigted version of ggplot2 empirical cumulative distribution function (ECDF)

The current version of stat_ecdf in ggplot2 does not include observation weights. I simply replace the ecdf statistic within the code of ggplot2::stat_ecdf in order to make it possible to use weighted samples. The function works exactly as any other ggplot2 object. Here is an example :

ggplot(d, 
       aes(x,  weight = w)) + 
  stat_ecdf()

About

Weigted version of ggplot2 empirical cumulative distribution function (ECDF)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%