Hi,
Try
tab education, gen(education)
OR
xi i.education
Olalekan Uthman
--- On Sat, 7/19/08, Ziad El-Khatib <[email protected]> wrote:
> From: Ziad El-Khatib <[email protected]>
> Subject: st: Command related to putting categories into separate columns
> To: [email protected]
> Date: Saturday, July 19, 2008, 7:53 AM
> Hi!
> I used to recall this command and I have been trying to
> figure it out
> again for 10 days now, so gave up and will try to put it on
> the list
> for tips?
>
> I have variable 'education' with 4 levels of
> education: lev1, lev2,
> lev3 and lev4
> The one line command can create new variables: _lev1,
> _lev2, _lev3 and
> _lev4 with values (0/1)
>
> I know I could do gen _lev1=1 if education==lev1 etc... but
> I thought
> it will be nice to just use one liner for it.
>
> Thank you in advance and best regards
> ziad
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/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/statalist/faq
* http://www.ats.ucla.edu/stat/stata/