/******************************************************************** reshape.do Written by Russell Dimond 10/2002 for Intermediate Stata Class Loads a couple different data sets and reshapes them, demonstrating the results. In the second case it also removes "fake" observations. ********************************************************************/ clear capture log close set more off log using reshape,text replace use reshape1 l reshape wide pop, i(country) j(year) l reshape long pop, i(country) j(year) l use reshape2,replace l reshape long age sex, i(hh_id) j(orderInHH) l drop if sex=="" & age==. l log close