/******************************************************************** hier1.do Written by Russell Dimond 10/2002 for Intermediate Stata Class First part of hier.do This part reads in only the households and gives them a household id (hh) equal to their observation number. It also sorts for future merging. ********************************************************************/ clear capture log close set more off log using hier1,text replace infile using hh if type=="h" gen byte hh=_n sort hh drop type save hier1,replace log close