Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: New package -wridit- on SSC


From   "Seed, Paul" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: New package -wridit- on SSC
Date   Tue, 28 Feb 2012 16:41:04 +0000

Thanks as ever to Roger & Nick for their work on this.
I went back to the original article by Bross to try to understand what ridits were:
Bross, I. D. J.  1958.  How to use ridit analysis.  Biometrics 14: 38-58.
http://www.jstor.org/stable/2527727

The name ridit actually derives by analogy from probit and logit, 
and is in part "Relative to an Identified Distribution".
Neither -wridit- not -egen , ridit()- have options to specify the identified distribution,
as Bross intended.

However, it is possible to fudge it:
Assume I want ridits for rep78 in the auto dataset, and want to use the US subsample 
as my Identified Distribution (or reference distribution).

**************************
* Begin example analysis *
**************************
sysuse auto, clear
egen ridit_rep78_usa  = ridit( rep78) if foreign == 0
bys rep78 (foreign) : replace ridit_rep78_usa  =  ridit_rep78_usa[1] if foreign[1] == 0
bys foreign : summ ridit_rep78_usa 

* Contrast this with using all the data as the reference group:

egen ridit_rep78 = ridit( rep78) 
bys foreign : summ ridit_rep78

* The means have shifted by a fixed amount, and the SD have changed slightly.

**************************
*  End example analysis  *
**************************

> Roger B. Newson
>
> Thanks as always to Kit Baum, a new package -wridit- is now available
> for download from SSC. In Stata, use the -ssc- command to do this.
>
> The -wridit- package is described as below on my website, and calculayes
> weighted ridits for a variable. Zero weights are allowed, in which case
> the ridits for the observations with zero weights are relative to the
> weight distribution in the observations with non-zero weights. Ridits,
> and the left, right and central inverse ridits, are important in rank
> statistics, which, strictly speaking, are really ridit statistics. They
> are also potentially useful in spline statistics, where the user might
> want to define a spline in the ridit of an X-variable, instead of in the
> X-variable itself.
>
> I would like to thank Nick Cox for writing the -ridit()- function of the
> -egenmore- package, which generates unweighted ridits, and from which I
> borrowed a few ideas for -wridit-. I slightly revised the algorithm for
> -wridit-, in order to avoid the small numerical accuracy issues
> associated with adding a small probability to a large probability.
>
> ---------------------------------------------------------------------------
> package wridit from http://www.imperial.ac.uk/nhli/r.newson/stata10
> ---------------------------------------------------------------------------
>
> TITLE
>         wridit: Generate weighted ridits
>
> DESCRIPTION/AUTHOR(S)
>         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.
>
>         Author: Roger Newson
>         Distribution-Date: 22february2012
>         Stata-Version: 10
>
> INSTALLATION FILES                                  (click here to install)
>         wridit.ado
>         wridit.sthlp
> ---------------------------------------------------------------------------
> (click here to return to the previous screen)
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index