Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: automatic coding


From   "Patrick Sturgis" <[email protected]>
To   <[email protected]>
Subject   RE: st: automatic coding
Date   Tue, 23 Mar 2004 22:56:47 -0000

I am truly flabbergasted at the usefulness of this forum. Thanks to both of
you,

Patrick

Dr Patrick Sturgis 
Department of Sociology 
University of Surrey 
Guildford 
GU2 7XH 
tel: +44 (0) 1483 686974 
fax: +44 (0) 1483 689551 
e-mail: [email protected] 


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dimitriy V.
Masterov
Sent: 23 March 2004 22:09
To: [email protected]
Subject: Re: st: automatic coding

You might want to try this two step command.

***************************************************

egen float z = group(sex class edulev), label lname(zlbl)
tab z, gen(dummy)

***************************************************

Dimitriy Masterov


On Tue, 23 Mar 2004, Patrick Sturgis wrote:

> I would like to be able to produce a variable, or set of dummy variables
> whose values represent every cell of a multi-way table. E.g. if I have
> sex*class*educational level, I would automatically obtain a variable (or
> series of dummies) with values corresponding to every possible combination
> of values on these three variables. Is this possible in stata? Thanks
>
> Patrick
>
> Patrick Sturgis
> University of Surrey
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

____________________________________________________________________________
___
Dimitriy V. Masterov

Work:
Center for Social Program Evaluation
1155 East 60th St. Room 038
Chicago, IL 60637
Work: (773)256-6005
Fax: (773)256-6313

Home:
1312 East 53rd St., Apt.309
Chicago, IL 60615
Mobile: (773)220-2760


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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