Bookmark and Share

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, is already up and running.

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

st: xtile command for calculating tertiles

From   "Weichle, Thomas" <>
To   <>
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.

xtile tertile = opcd, nquantiles(3)

proc rank data = test out = ranks groups = 3;
	var opcd;
	ranks opcd_tert;

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261 

*   For searches and help try:

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