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

st: egen, cut and labels

From   "Dimitriy V. Masterov" <>
To   Statalist <>
Subject   st: egen, cut and labels
Date   Fri, 26 Oct 2007 17:24:39 -0400

When using egen with the cut option, is it possible to get nice value
labels for the resulting variable? Let's say I have some fake data:

set obs 100
gen x = uniform()
egen bins = cut(x), at(0(.1)1)

I would like to get value labels like "[0,.1)" and "[.1,.2)" ... and
"[0.9,1]". The labels option does not really do this. For the fake
data this is really trivial, but for a longer list this would be


*   For searches and help try:

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