Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: CI median difference and paired data

From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: CI median difference and paired data
Date   Fri, 06 May 2005 11:32:27 +0100

At 09:28 06/05/2005, Emma wrote:

Hi all

Does anyone have any code or know of a stata command that calculates a CI
around a median difference (non parametrically) on paired data.  The cendif
command only seems to be for data which is not paired (feel free to correct
me if I am wrong).
Emma is right. However, median paired differences can be calculated (with confidence intervals) by first calculating the paired differences and then using -centile-.

If the paired data are stored in variables -y1- and -y2-, then you can type

gene ydif=y1-y2
centile ydif, cci

and Stata will output the mean paired difference, with a conservative confidence interval.

Hope this helps.


Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
King's College London

5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

Opinions expressed are those of the author, not the institution.

* For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index