Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Roger B. Newson" <r.newson@imperial.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Tue, 28 Feb 2012 18:14:58 +0000 |

Best wishes Roger Roger B Newson BSc MSc DPhil Lecturer in Medical Statistics Respiratory Epidemiology and Public Health Group National Heart and Lung Institute Imperial College London Royal Brompton Campus Room 33, Emmanuel Kaye Building 1B Manresa Road London SW3 6LR UNITED KINGDOM Tel: +44 (0)20 7352 8121 ext 3381 Fax: +44 (0)20 7351 8322 Email: r.newson@imperial.ac.uk Web page: http://www.imperial.ac.uk/nhli/r.newson/ Departmental Web page: http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/ Opinions expressed are those of the author, not of the institution. On 28/02/2012 16:41, Seed, Paul wrote:

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/

* * 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/

**References**:**Re: st: RE: New package -wridit- on SSC***From:*"Seed, Paul" <paul.seed@kcl.ac.uk>

- Prev by Date:
**RE: st: RE: New package -wridit- on SSC** - Next by Date:
**Re: st: Counter-intuitive overflow behavior** - Previous by thread:
**RE: st: RE: New package -wridit- on SSC** - Index(es):