Code:
* Example generated by -dataex-. For more info, type help dataex clear input long id float(year y x GDP) byte(id1 id2 id3 id4 year1 year2 year3 year4) 1 2011 1.477398 .3132002 5.3 1 0 0 0 1 0 0 0 1 2012 1.7059364 .55597913 6.2 1 0 0 0 0 1 0 0 1 2013 2.2016048 .9382851 7.5 1 0 0 0 0 0 1 0 1 2014 2.3101015 .7363221 7.8 1 0 0 0 0 0 0 1 2 2011 .4857773 .19240755 5.3 0 1 0 0 1 0 0 0 2 2012 1.192688 .19514006 6.2 0 1 0 0 0 1 0 0 2 2013 2.0814517 .9509598 7.5 0 1 0 0 0 0 1 0 2 2014 .6230519 .29044542 7.8 0 1 0 0 0 0 0 1 3 2011 2.2117586 .8190824 5.3 0 0 1 0 1 0 0 0 3 2012 1.8595012 .4882096 6.2 0 0 1 0 0 1 0 0 3 2013 1.259727 .27048662 7.5 0 0 1 0 0 0 1 0 3 2014 1.4586093 .58597064 7.8 0 0 1 0 0 0 0 1 4 2011 .10921151 .05390351 5.3 0 0 0 1 1 0 0 0 4 2012 2.0568795 .5583192 6.2 0 0 0 1 0 1 0 0 4 2013 1.7943153 .6395468 7.5 0 0 0 1 0 0 1 0 4 2014 2.802899 .9747689 7.8 0 0 0 1 0 0 0 1 end
Code:
reg y x GDP i.id ib2011.year, robust outreg2 using "Unidentified-t1", word excel dec(4) ctitle(by=2011) replace reg y x GDP i.id ib2012.year, robust outreg2 using "Unidentified-t1", word excel dec(4) ctitle(by=2012) append reg y x GDP i.id ib2013.year, robust outreg2 using "Unidentified-t1", word excel dec(4) ctitle(by=2013) append reg y x GDP i.id ib2014.year, robust outreg2 using "Unidentified-t1", word excel dec(4) ctitle(by=2014) append reg y x i.id ib2011.year GDP, robust outreg2 using "Unidentified-t1", word excel dec(4) ctitle(by=2011) append
Array
My questions are (1) how can I change 2.id, 3.id, 4.id to id=2, id=3, id=4 in the first column, (2) similar for the 2011.year to year=2011, ..., and so on, (3) drop 2013o.year, 2014o.year, and o.GDP. Any suggestions are welcome.
0 Response to output from outreg2.
Post a Comment