Statalist


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

st: RE: re: reshape


From   "Richard Pitman" <richard.pitman@oxfordoutcomes.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: re: reshape
Date   Wed, 5 Sep 2007 12:17:13 +0100

Thanks Kit, much appreciated

Richard

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Kit Baum
Sent: 05 September 2007 11:54
To: statalist@hsphsun2.harvard.edu
Subject: st: re: reshape

g jvar = Cay+Caz
drop Cay Caz
reshape wide Cbx, i(ID) j(jvar) string

This will not create columns for values of jvar that do not exist in  
the data (e.g. bx, by). If you want to do that, add dummy  
observations for ID=1 with Cay=b, Caz=x  and Cay=b, Caz=y before  
executing the code above.


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index