[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
An Introduction to Modern Econometrics Using Stata:

* For searches and help try:

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