Relative Distribution Methods

Tools for the comparison of distributions. This includes nonparametric estimation of the relative distribution PDF and CDF and numerical summaries as described in "Relative Distribution Methods in the Social Sciences" by Mark S. Handcock and Martina Morris, Springer-Verlag, 1999, Springer-Verlag, ISBN 0387987789.


RDbook banner

The reldist package

This is an R package to implement relative distribution methods. These methods are described in the book Relative Distribution Methods in the Social Sciences, by Mark S. Handcock and Martina Morris, Springer-Verlag, Inc., New York, 1999 ISBN 0387987789 .

It was developed by Mark S. Handcock.

It is software to estimate and graph the relative density, cumulative distribution function (CDF) and related functions. Also functions to estimate summary measures and their uncertainties. This contains functions directly related to the relative distribution and some data used in the book.

Installation

To install the latest development version from github, the best way it to use git to create a local copy and install it as usual from there. If you just want to install it, you can also use:

# If devtools is not installed:
# install.packages("devtools")

devtools::install_github("handcock/reldist")

Resources

  • For a more detailed description of what can be done with the reldist package, see the introductory vignette by Handcock & Aldrich (2002) obtained at SSRN: http://dx.doi.org/10.2139/ssrn.1515775

To run an example use:

library(reldist)

First load the data:

data(nls, package="reldist")

A simple example comparing permanent wages of the original to the recent cohort in the NLS. See H&M (1999) for details.

reldist(y=recent$chpermwage,yo=original$chpermwage,method="bgk")

A more sophisticated version of the same.

reldist(y=recent$chpermwage, yo=original$chpermwage,
        yowgt=original$wgt, ywgt=recent$wgt,
        bar=TRUE,
        smooth=0.1, method="bgk",
        yolabs=seq(-1, 3, by=0.5),
        ylim=c(0, 3.0),cex=0.8,
        ylab="Relative Density",
        xlab="Proportion of the Original Cohort")

A CDF version.

reldist(y=recent$chpermwage, yo=original$chpermwage,
    yowgt=original$wgt, ywgt=recent$wgt,
    cdfplot=TRUE,
    smooth=0.4,
    yolabs=seq(-1,3,by=0.5),
    ylabs=seq(-1,3,by=0.5),
    cex=0.8,
    method="bgk",
    ylab="proportion of the recent cohort",
    xlab="proportion of the original cohort")

There is more information and working examples on the website: http://faculty.stat.ucla.edu/handcock/RelDist/

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("reldist")

1.7-2 by Mark S. Handcock, 4 years ago


http://www.stat.ucla.edu/~handcock/RelDist/


Browse source code at https://github.com/cran/reldist


Authors: Mark S. Handcock <[email protected]>


Documentation:   PDF Manual  


GPL-3 + file LICENSE license


Imports mgcv, densEstBayes

Suggests locfit


Imported by accept, geocmeans, lidaRtRee.

Suggested by blocs.


See at CRAN