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]
st: xtile command for calculating tertiles
From
"Weichle, Thomas" <[email protected]>
To
<[email protected]>
Subject
st: xtile command for calculating tertiles
Date
Fri, 22 Oct 2010 16:37:15 -0500
Hi Statalisters,
Can anyone comment on the difference between the way Stata's -xtile-
command creates tertiles compared to the way the SAS -proc rank- creates
tertiles? And the differences in which ties are handled? The following
are the code I'm using and I am getting slightly different results. My
data do contain ties and I think this is the issue.
Stata:
xtile tertile = opcd, nquantiles(3)
SAS:
proc rank data = test out = ranks groups = 3;
var opcd;
ranks opcd_tert;
run;
Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261
[email protected]
*
* 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/