Statalist


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

st: re: reshape


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: reshape
Date   Wed, 5 Sep 2007 06:53:48 -0400

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/




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