Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: Grouping income variables- RECODE COMMAND

 From Nick Cox To "statalist@hsphsun2.harvard.edu" Subject Re: st: Grouping income variables- RECODE COMMAND Date Sat, 1 Feb 2014 17:51:50 +0000

Your code shows you using the -recode()- function, which is quite
different from the -recode- command. In Stata functions and commands
are different!

I think that to comment helpfully we need to see more about your
-hinctnt-, for example, the results of

. su hinctnt, detail

Your categories are not disjoint as (e.g.) the definitions [70, 120]
and [120, 230] leave ambiguous what happens with 120. Alternatively,
your notation here confuses the meaning of [ ] and ( ).
Nick
njcoxstata@gmail.com

On 1 February 2014 17:29, Antonio Rodriguez Andres
<Antonio.Andres@emu.edu.tr> wrote:
> Dear Stata users,
>
> I have to group the income variable in different intervals. In the original
> dataset, the household income variable is grouped
> İnto 12 categories
>
> J <40
> R [40,70]
> C [70, 120]
> M [120, 230]
> F [230, 350]
> S
> K
> P
> D
>  H
>  U [1730, 2310)
> N > 2310
>
> I want to group J and R categories <70 Euros, and create dummy variables for
> all income groups. That is the Stata ouput. I used the recode command
> But it does not work
>
> gen hinc_gr=recode(hinctnt, 70, 120, 230, 350, 460, 580, 690, 1150, 1730,
> 2310)
> (13282 missing values generated)
>
> . tab hinc_gr
>
>     hinc_gr |      Freq.     Percent        Cum.
> ------------+-----------------------------------
>          70 |     29,718      100.00      100.00
> ------------+-----------------------------------
>       Total |     29,718      100.00
>
> Regards
>
> Antonio
>
>
>
> *
> *   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/