------------------------------------------------------------------------------- help forwridit(Roger Newson) -------------------------------------------------------------------------------

Generate weighted ridits

wriditvarname[if] [in] [weight] ,generate(newvarname)[by(varlist)foldedreversepercentfloat]

fweights,pweights,aweights, andiweights are allowed; see weight.

Description

wriditinputs 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. Ifby()is specified, then the weighted ridits are computed within by-groups.

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

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

percentspecifies that the weighted ridits will be generated on a percentage scale from 0 to 100, or from -100 to 100 iffoldedis specified. Ifpercentis not specified, then the weighted ridits will be generated on a proportion scale from 0 to 1, or from -1 to 1 iffoldedis specified.

floatspecifies that the weighted ridits will be generated with storage typefloat. Iffloatis not specified, then the weighted ridits will be generated with storage typedouble.

RemarksRidits were introduced by Bross (1958). Given a variable

X, the unfolded ridit for a valuexis equal to the probability thatX<xplus half the probability thatX==x. The folded ridit forxis equal to the probability thatX<xminus the probability thatX>x. Nicholas J. Cox introduced anegenfunctionridit(), computing unweighted ridits, as part of theegenmorepackage, downloadable from SSC.

Examples

. wridit mpg, gene(wrid1)

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

ReferencesBross, I. D. J. 1958. How to use ridit analysis.

Biometrics14(1): 18-38.

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

Also seeManual:

[D] egenOn-line: help foregenhelp foregenmoreif installed