Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: somersd: clustering with wstrata ?


From   "Feiveson, Alan H. (JSC-SK311)" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: somersd: clustering with wstrata ?
Date   Fri, 9 May 2008 13:29:10 -0500

Hi Roger - 

Thanks for the good advice - Sorry, I had lazily skipped over the
discussion of the -funtype- option in your article. 

I don't know why my message appeared twice - but anyway I apologize.


Al

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Newson, Roger
B
Sent: Friday, May 09, 2008 11:44 AM
To: [email protected]
Subject: st: RE: somersd: clustering with wstrata ?

The way to stratify and cluster on the same variable is to use the
option -funtype(wcluster)- in addition to the -cluster(id)-.

The option -cluster(id)- tells -somersd- that we are sampling clusters
from a population of clusters, rather than sampling observations from a
population of observations. The option -funtype()- specifies whether we
are comparing within clusters (indicated by -funtype(wcluster)-),
between clusters (indicated by -funtype(bcluster)-), or both (indicated
by -funtype(vonmises)-). The default of the -funtype()- option is
-funtype(bcluster)-. So, if you try to specify -wstrata(id) cluster(id)-
without specifying -funtype(wcluster)-, then -somersd- assumes that you
are asking to restrict yourself to comparisons both between AND within
IDs, which of course is an empty set of comparisons.

The -funtype()- option is short for "functional type". Somers' D is a
ratio of means if you specify -funtype(wcluster)-, a ratio of Hoeffding
functionals or U-statistics if you specify -funtype(bcluster)-, and a
ratio of Von Mises functionals if you specify -funtype(vonmises)-. See
Newson (2006) for further references.

I hope this helps.

Best wishes

Roger

References

Newson R. Confidence intervals for rank statistics: Somers' D and
extensions. The Stata Journal 2006; 6(3): 309-334. Download
pre-publication draft from
http://www.imperial.ac.uk/nhli/r.newson/papers.htm
or buy a proper version from
http://www.stata-journal.com/article.html?article=snp15_6


Roger B Newson
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: [email protected]
Web page: 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: [email protected]
[mailto:[email protected]] On Behalf Of Feiveson,
Alan H. (JSC-SK311)
Sent: 09 May 2008 17:11
To: [email protected]
Subject: st: somersd: clustering with wstrata ?

Hi - I wish to compare two variables within repeated observations on
subjects using -somersd-.  If I use the "wstrata" option, would the
standard error also be adjusted to take care of the non-independent
observations pertaining to the same subject? Apparently I can't use
"cluster" and "wstrata" on the same variable. I don't think I want to
use "cluster" alone if I want the comparisons to be within each subject.


Al Feiveson

. somersd z6a age,wstrata(id)
Symmetric 95% CI
------------------------------------------------------------------------
------
             |              Jackknife
         z6a |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
         age |   .3608484   .0250542    14.40   0.000      .311743
.4099537

. somersd z6a age,wstrata(id) cluster(id) Symmetric 95% CI
                                   (Std. Err. adjusted for 403 clusters
in id)
------------------------------------------------------------------------
------
             |              Jackknife
         z6a |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
         age |  (dropped)
------------------------------------------------------------------------
------

. somersd z6a age,cluster(id)
Symmetric 95% CI
                                   (Std. Err. adjusted for 403 clusters
in id)
------------------------------------------------------------------------
------
             |              Jackknife
         z6a |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
         age |   .4528894   .0239833    18.88   0.000     .4058829
.4998958
------------------------------------------------------------------------
------






*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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