help for fracrankP. Van Kerm (April 2020, February 2010, September 2009)

Title

fracrank -- Fractional ranks

Syntax

fracrank
varname
[weight]
[if exp]
[in range]
, generate(newvarname [,replace])

varlist may contain time-series operators; see tsvarlist.

fweight, aweight, pweight and iweight are allowed; see help weights.

Description

fracrank generates a new variable filled with the fractional rank of the data in the distribution of varname.
Fractional ranks are computed using a mid-interval cumulative distribution estimator that ensures that the average
fractional rank is 0.5. See the online manual for details.

Option

generate(newvar) fills the new variable newvar with the estimated fractional ranks. The sub-option replace can be used to replace any already existing variable named newvar.

Example

. fracrank price , gen(rank)

. fracrank price , gen(rank , replace)

Also see

Manual: [R] cumul

Online: cumul, sgini (if installed)

Author

Philippe Van Kerm, CEPS/INSTEAD, Lux

Philippe Van Kerm, Luxembourg Institute of Socio-Economic Research (LISER) and University of Luxembourg, philippe.vankerm@liser.luembourg, philippe.vankerm@ceps.lu

Acknowledgments

This package was originally written for the MeDIM project
(Advances in the Measurement of Discrimination, Inequality and Mobility)
supported by the Luxembourg Fonds National de la Recherche (contract FNR/06/15/08)
and by core funding for CEPS/INSTEAD by the
Ministry of Culture, Higher Education and Research of Luxembourg.