-------------------------------------------------------------------------------
help for wridit                                                  (Roger Newson)
-------------------------------------------------------------------------------

Generate weighted ridits

wridit varname [if] [in] [weight] , generate(newvarname) [ by(varlist) folded reverse percent float ]

fweights, pweights, aweights, and iweights are allowed; see weight.

Description

wridit inputs a variable and generates its weighted ridits. If no weights are provided, then all weights are assumed equal to 1, so unweighted ridits are generated. Zero weights are allowed, and imply that the ridits calculated for the observations with zero weights will refer to the distribution of weights in the observations with nonzero weights.

Options

generate(newvarname) must be specified. It specifies the name of the generated output variable, containing the weighted ridits.

by(varlist) specifies a list of by-variables. If by() is specified, then the weighted ridits are computed within by-groups.

folded specifies that the weighted ridits generated will be folded ridits. A folded ridit, on a proportion scale from -1 to 1, is defined as 2*R-1, where R is the corresponding unfolded ridit (on a proportion scale from 0 to 1).

reverse specifies that the weighted ridits will be reverse ridits, based on reverse cumulative probabilities.

percent specifies that the weighted ridits will be generated on a percentage scale from 0 to 100, or from -100 to 100 if folded is specified. If percent is not specified, then the weighted ridits will be generated on a proportion scale from 0 to 1, or from -1 to 1 if folded is specified.

float specifies that the weighted ridits will be generated with storage type float. If float is not specified, then the weighted ridits will be generated with storage type double.

Remarks

Ridits were introduced by Bross (1958). Given a variable X, the unfolded ridit for a value x is equal to the probability that X<x plus half the probability that X==x. The folded ridit for x is equal to the probability that X<x minus the probability that X>x. Nicholas J. Cox introduced an egen function ridit(), computing unweighted ridits, as part of the egenmore package, downloadable from SSC.

Examples

. wridit mpg, gene(wrid1)

. wridit mpg [pwei=weight], gene(wrid2) by(foreign)

References

Bross, I. D. J. 1958. How to use ridit analysis. Biometrics 14(1): 18-38.

Author

Roger Newson, National Heart and Lung Institute, Imperial College London, UK. Email: r.newson@imperial.ac.uk

Also see

Manual: [D] egen On-line: help for egen help for egenmore if installed