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

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

From |
William Buchanan <william@williambuchanan.net> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: how to group variables into equal number groups |

Date |
Tue, 26 Mar 2013 08:31:06 -0700 |

That would likely yield similar results. Instead, it would be a good idea to take Maarten's advice to think and examine the data more critically. Once you have a better idea of the distribution of observations within that variable, use the option that allows you to specify the values for the cut points of the groups instead. If you have a substantial number of ties, however, it may not be possible to get evenly distributed groups. Sent from my iPhone On Mar 26, 2013, at 8:01, Xixi Lin <winnielxx@gmail.com> wrote: > Hi Billy, > > There are some ties for some variables, will that be a big problem? > > Btw, do you mean egen decile=group(10)? > > Thanks, > Xixi Lin > > On Tue, Mar 26, 2013 at 10:44 AM, William Buchanan > <william@williambuchanan.net> wrote: >> Why not use -egen-? Also, are there ties in the values for the variable you are trying to recode? >> >> HTH, >> Billy >> >> Sent from my iPhone >> >> On Mar 26, 2013, at 7:30, Xixi Lin <winnielxx@gmail.com> wrote: >> >>> Hi, >>> >>> I am trying to make independent variables into decile groups, and I >>> used xtile decile=x1 if Period==`z', nq(10); however, it turns out >>> that xtile does not make equal number of the 10 groups, is there any >>> way to force stata to divide them into equal number of obs or almost >>> equal number of obs? >>> >>> Thanks, >>> Xixi Lin >>> * >>> * For searches and help try: >>> * http://www.stata.com/help.cgi?search >>> * http://www.stata.com/support/faqs/resources/statalist-faq/ >>> * http://www.ats.ucla.edu/stat/stata/ >> >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/faqs/resources/statalist-faq/ >> * http://www.ats.ucla.edu/stat/stata/ > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**References**:**st: how to group variables into equal number groups***From:*Xixi Lin <winnielxx@gmail.com>

**Re: st: how to group variables into equal number groups***From:*William Buchanan <william@williambuchanan.net>

**Re: st: how to group variables into equal number groups***From:*Xixi Lin <winnielxx@gmail.com>

- Prev by Date:
**Re: st: Using foreach and forval to append data files** - Next by Date:
**Re: st: how to group variables into equal number groups** - Previous by thread:
**Re: st: how to group variables into equal number groups** - Next by thread:
**Re: st: how to group variables into equal number groups** - Index(es):