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: Fwd: xtile: how to make it fast

From   Luigi Pinoni <>
Subject   st: Fwd: xtile: how to make it fast
Date   Fri, 8 Feb 2013 17:39:40 +0100

Dear Statalisters,

Do you know any a faster way of doing what ^xtile^ command does?

Let me explain my problem:

I have a variable, say X, with 50k observations, and a frequency
weights, say W, which is on average 6k. I need to generate a new
variable that categorizes X by a large number of quantiles (40k).

I need something that ideally ^xtile^ command does but it takes ages.
My command line for variable X is:

xtile double pc = X [fw = W]. nq(40000)

I guess the problem is that xtile is written as an ado file without
using Mata and it loops forever and ever.

Many thanks for your help!

*   For searches and help try:

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