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

# st: RE: significance test between two kendalls' tau coefficents ?

 From "Newson, Roger B" To Subject st: RE: significance test between two kendalls' tau coefficents ? Date Thu, 4 Dec 2008 14:11:43 -0000

```Yes, it is possible. However, how to do it depends on whether the
Kendall's tau coefficients are from the same sample, or from different
samples.

In Stata, confidence intervals for Kendall's tau-a statistics and their
differences can be calculated using the -somersd- package, downloadable
from SSC using the -ssc- command. This package is described in Newson
(2002), Newson (2006a) and Newson (2006b), and calculates confidence
intervals for a wide range of rank statistics, including some with
sample weighting, clustering and/or stratification.

Often, given a single outcome variable Y and 2 positive predictors X and
W, we want to know which of the 2 positive predictors predicts Y better.
This is because, as proved in Newson (2006a) and Newson (2002), if a
positive association of Y with X is caused by a positive association of
both variables with W, then we must have the inequalities

tau(Y,X) <= tau (W,X)
tau(X,Y) >= tau(W,Y)

where tau(.,.) is Kendall's tau-a. Typically, in Stata, we type

somersd Y X W, taua tdist
lincom X-W

The -somersd- command, with the -taua- option, calculates confidence
intervals for the Kendall's tau-a parameters tau(Y,X) and tau(Y,W). The
-lincom- command calculates a confidence interval for the difference
tau(Y,X)-tau(Y,W).

Sometimes, by contrast, we may want to estimate the difference between 2
tau(Y,X) statistics in different subpopulations, from which we have
taken 2 different subsamples. In this case, we can use the -somersd-
package with the -parmest- package, also downloadable from SSC. The
-parmest- package creates and processes output datasets (or resultssets)
with 1 observation per estimated parameter and data on estimates,
standard errors, confidence limits and P-values, and is described in
Newson (2003), Newson (2004), and Newson(2008). If the variable -subpop-
indicates which of 2 subpopulations an observation belongs to, then we
may type in Stata

parmby "somersd Y X, taua tdist", by(subpop) norestore
list
metaparm [iwei=(subpop==2)-(subpop==1)] if parm=="X", list(,)

The -parmby- command creates, in the memory, an output dataset (or
resultsset), with 1 observation per fitted tau-a parameter and data on
their estimates, standard errors, confidence limits, and P-values. (This
resultsset overwrites the original dataset.) The tau-a parameters, are
tau(Y,Y) in subpopulation 1, tau(Y,X) in subpopulation 1, tau(Y,Y) in
subpopulation 2, and tau(Y,X) in subpopulation 2. We want to compare the
2 tau(Y,X) parameters. (The tau(Y,Y) parameters are simply probabilities
that 2 randomly-chosen Y-values are unequal.) The list command lists all
the estimated parameters. The metaparm command calculates and lists a
confidence interval for the difference between the tau(Y,X) parameter in
subpopulation 2 and the tau(Y,X) parameter in subpopulation 1.

I hope this helps. Let me know if you have any queries.

Best wishes

Roger

References

Newson R. B. parmest and extensions. Presented at the 14th UK Stata User
Meeting, 8-9 September, 2008. Download presentation from
http://www.imperial.ac.uk/nhli/r.newson/usergp.htm

Newson R. 2006b. Confidence intervals for rank statistics: Percentile
slopes, differences, and ratios. The Stata Journal 6(4): 497-520. Buy
the article from
http://www.stata-journal.com/archives.html
or download a pre-publication draft from
http://www.imperial.ac.uk/nhli/r.newson/papers.htm

Newson R. 2006a. Confidence intervals for rank statistics: Somers' D and
extensions. The Stata Journal 6(3): 309-334. Buy the article from
http://www.stata-journal.com/archives.html
or download a pre-publication draft from
http://www.imperial.ac.uk/nhli/r.newson/papers.htm

Newson R. From datasets to resultssets in Stata. Presented at the 10th
UK Stata User Meeting, 28-29 June, 2004. Download presentation and
handouts from
http://www.imperial.ac.uk/nhli/r.newson/usergp.htm

Newson R. 2003. Confidence intervals and p-values for delivery to the
end user. The Stata Journal 3(3): 245-269. Download the article from
http://www.stata-journal.com/archives.html
or download a pre-publication draft from
http://www.imperial.ac.uk/nhli/r.newson/papers.htm

Newson R. 2002. Parameters behind "nonparametric" statistics: Kendall's
tau, Somers' D and median differences. The Stata Journal 2(1): 45-64.
Download the article from
http://www.stata-journal.com/archives.html

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/pop
genetics/reph/

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

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Marcus
Fischer
Sent: 04 December 2008 11:35
To: statalist@hsphsun2.harvard.edu
Subject: st: significance test between two kendalls' tau coefficents ?

I would like to compare two Kenadalls' tau coefficients. Is it possible
to test whether one coefficient is significantly higher than the other
one ?
Thanks.

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

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