---------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  G:\My Drive\research\HotColdReplication\results/MasterAHS.txt
  log type:  text
 opened on:   2 Jun 2022, 16:40:46

.  
. cd "Data/AmericanHousingSurveyData/"
G:\My Drive\research\HotColdReplication\Data\AmericanHousingSurveyData

. 
. ********************************************************************************
. 
. local start = c(current_time)

. 
. * uncomment to read the data from raw source into stata format
. * include "$programs/ReadAHSData"
. 
. local first = c(current_time)

. 
. cd "$parent/results"
G:\My Drive\research\HotColdReplication\results

. 
. include "$programs/AnalyzeAHSDataMultipleImputation"  // main analysis file

. ******************************************************************************
. *                 AnalyzeAHSDataMultipleImputation.do                        *
. ******************************************************************************
. 
. set more off

. clear all

. estimates clear

.         
. local shorten = 1

. * use local shorten = 0 to run all regressions  
. * use local shorten = 1 in order to skip some regressions later in the file
.         
. local controls = "zinc per zadult i.region i.intyr"

. 
. global months = `" 1 "Jan" 2 "Feb" 3 "Mar" 4 "Apr" 5 "May" 6 "Jun" 7 "Jul" 8 "Aug" 9 "Sep" 10 "Oct" 11 "Nov" 
> 12 "Dec" "'

. 
. use "$parent/data/AmericanHousingSurveyData/AHSForAnalysis", clear

. 
. * drop Metropolitan Sample data to show that results are not due to metro/national differences
. * keep if sampleflag == "NationalSample"
. 
. levelsof intyr , local(intyr_levels)
1999 2001 2002 2003 2004 2005 2007 2009 2011

. 
. * Specify temp values for datasets etc.
. tempfile original

. tempfile results

. tempfile imputed

. tempfile pmovm

. tempfile gather_all_groups

. tempfile tempgroup

. tempfile durations

. tempfile ForImputations

. tempfile mi

. tempfile histmonthprior

. tempfile histmonthcurrent

. tempfile preimputation

. 
. tempname postresults

. 
. 
. gen school = (schoth == 1 | schpri == 1 | schpub == 1)

. 
. label var movm "Month of Current Move"

. label var pmovm "Month of Prior Move"

. label var school "Kids in school"

. label var built "(log) Year built"

. label var zinc "(log) Income"

. label var per "HH size"

. label var zadult "Num. adults"

. 
. label var intyr "Survey Year"

. 
. 
. * degree days, not collected in metropolitan sample; impute from CMSA
. egen mode_degree = mode(degree), by(cmsa) 

. gen degree_flag = (degree == . & mode_degree != .)

. replace degree = mode_degree if degree == .
(272,338 real changes made)

. 
. replace region = 1 if cmsa == 80 & region == .  // Providence-Pawtucket-Fall River, RI-MA
(2,072 real changes made)

. drop if region == .  // some observations have missing region information, cmsa is 99 (other) 
(7,850 observations deleted)

. 
. * missing values for move year and prior move year
. 
. * missing values:
. mvdecode ran rac value pmovm pmovyr movm move sch* , ///
>   mv(-6 = .a \ -7 = .b \ -8 = .c \ -9 = .d)
         ran: 412433 missing values generated
         rac: 412433 missing values generated
       value: 364845 missing values generated
       pmovm: 677076 missing values generated
      pmovyr: 632697 missing values generated
      schoth: 560087 missing values generated
      schpri: 550264 missing values generated
      schpub: 482147 missing values generated

. 
. label define mv_lbl .a "Not reported" .d "Not applicable"

. 
. label values movm move pmovm pmovyr ran rac value mv_lbl   

. 
. keep control intyr movm move pmovm pmovyr region per zadult zinc weight tenure value built METRO3 degree smsa
>  cmsa rac ran sch* sampleflag

. 
. 
. gen movedate = ym(move,movm)
(266,124 missing values generated)

. gen pmovedate = ym(pmovyr,pmovm)
(677,087 missing values generated)

. gen duration = movedate - pmovedate
(677,556 missing values generated)

. gen durationy = move-pmovyr
(633,467 missing values generated)

. gen duration2 = durationy
(633,467 missing values generated)

. 
. gen summer = ( pmovm > 3 & pmovm < 10 ) if !mi(pmovm)
(677,076 missing values generated)

. label var summer "Summer"

. 
. gen nsummer = ( movm > 3 & movm < 10 )  if !mi(movm)
(266,124 missing values generated)

. label var nsummer "Summer"

. 
. * Indicate recent move:
. gen recentmove = (intyr-move<=2)

. 
. * Cost share 
. gen costshare = rac/value
(412,433 missing values generated)

. gen lcost = log(costshare) if costshare <= 5000
(560,981 missing values generated)

. 
. 
. 
. /*
> Referee 3 (J Applied Econometrics) suggests 
>  -- to keep observations with missing income (as in Ngai and Tenreyro)
>  -- to keep observations where priormove is recorded as subsequent to current move
>  -- to not impute cmsa and heating-cooling degree days
> */
.  
. keep if !mi(zinc)
(249,820 observations deleted)

. 
. * eliminate observations where the prior move is recorded as subsequent to the current move
. drop if ym(move,movm) < ym(pmovyr,pmovm) & !mi(pmovm) 
(622 observations deleted)

. 
. 
. 
. *gen school = (schoth == 1 | schpri == 1 | schpub == 1)
. 
. label var school "Kids in school"

. label var built "(log) Year built"

. label var zinc "(log) Income"

. label var per "HH size"

. label var zadult "Num. adults"

. 
. label var intyr "Survey Year"

. 
. label define month_lbl $months

. label values pmovm month_lbl

. 
. * generate fraction of January observations to change in imputation_random
. * make number of January and number of February moves equal in imputed data
. count if pmovm==2 & recentmove==1
  4,461

. local feb = r(N)

. count if pmovm==1 & recentmove==1
  6,555

. local jan = r(N)

. local imp_fraction = 1-(12/11)*(1-`feb'/`jan')

. 
. ********************************************************************************
. 
. note : "Original Data, after cleaning"

. save `original', replace
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000001.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000001.tmp saved as .dta format

. 
. note : "AHS data saved prior to analysis"

. save "$parent/data/original.dta", replace
(file G:\My Drive\research\HotColdReplication/data/original.dta not found)
file G:\My Drive\research\HotColdReplication/data/original.dta saved

. 
. 
. * note: since the following file uses a bootstrapping procedure, it advances the seed in Stata, and so affect
> s subsequent analysis that use random numbers
. preserve

. *include "$programs/BootstrapCommonSampleSize.do"
. restore

. 
. rm "$parent/data/original.dta"

. 
. summarize

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
     control |    494,781    4.05e+11    2.70e+11          1   1.00e+12
       built |    494,781    7.583508    .0128391   7.554859   7.606388
       pmovm |     65,285    6.244421    3.243236          1         12
      pmovyr |    108,474    1999.075    8.308605       1900       2011
      schoth |      1,182           1           0          1          1
-------------+---------------------------------------------------------
      schpri |     10,911           1           0          1          1
      schpub |     77,909           1           0          1          1
      tenure |    494,781    1.352334    .5074416          1          3
       value |    327,702    226095.1    255600.2          1    5264699
         per |    494,781    2.545704    1.462778          1         20
-------------+---------------------------------------------------------
      zadult |    494,781     1.88674     .849162          0         11
        zinc |    494,781    10.54842    1.164916          0    16.1181
         ran |    327,702    1.764393    2.552887          0         35
         rac |    327,702    4822.568    18750.21          0    2212267
      region |    494,781    2.683844    1.032851          1          4
-------------+---------------------------------------------------------
        smsa |    494,781    6288.844    3290.591         80       9999
        cmsa |    494,781    86.66462    23.38913          7         99
      degree |    494,781    2.948864    1.364208          1          6
      METRO3 |    494,781    3.478935    2.407315          1          7
      weight |    494,781    1612.219    1278.458   .2031829   46814.65
-------------+---------------------------------------------------------
       intyr |    494,781    2005.724    4.104057       1999       2011
  sampleflag |          0
        move |    467,497    1995.656    12.56436       1919       2011
        movm |    467,497    6.575172    3.233796          1         12
      school |    494,781    .1776887    .3822509          0          1
-------------+---------------------------------------------------------
    movedate |    467,497     433.442    150.7337       -492        623
   pmovedate |     65,285    515.1802    50.29313        197        622
    duration |     64,841    22.43275    15.25231          0        276
   durationy |    107,743    5.171501     7.34971        -70        109
   duration2 |    107,743    5.171501     7.34971        -70        109
-------------+---------------------------------------------------------
      summer |     65,285     .573271     .494606          0          1
     nsummer |    467,497    .5683887    .4953014          0          1
  recentmove |    494,781    .3052967    .4605334          0          1
   costshare |    327,702    9.368307    1128.969          0     525083
       lcost |    182,401   -4.065766    1.704624  -13.72639   8.517193

. 
. ********************************************************************************
. 
. ********************************************************************************
. * GRAPHS
. ********************************************************************************
. 
. tw scatter movm pmovm, jitter(5) msize(vtiny) note("Note: jittering applied") xsc(r(0 13)) xlab(2(3)11) ysc(r
> (0 13))  ylab(2(3)11)  xlab($months) ylab($months)

. 
. 
. graph export "../results/scattercurrentpriormonth.pdf" , as(pdf) replace
file ../results/scattercurrentpriormonth.pdf saved as PDF format

. 
. 
. hist pmovm, disc xsc(range(1 12)) xlabel($months) ///
>   ti("Month of prior move") xti("") yline(`=1/12') saving(`histmonthprior', replace)
(start=1, width=1)
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000a.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000a.tmp saved as .gph format

. graph export "../results/histmonth.pdf", as(pdf) replace
file ../results/histmonth.pdf saved as PDF format

. 
. hist movm if !mi(pmovm), disc xsc(range(1 12)) xlabel($months) ///
>   ti("Month of current move") xti("") yline(`=1/12') saving(`histmonthcurrent' , replace)
(start=1, width=1)
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000b.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000b.tmp saved as .gph format

. 
. graph export "../results/histmonthcurrentall.pdf", as(pdf) replace
file ../results/histmonthcurrentall.pdf saved as PDF format

. 
. graph combine "`histmonthprior'" "`histmonthcurrent'"

. graph export "../results/histogramspriorcurrent.pdf" , as(pdf) replace
file ../results/histogramspriorcurrent.pdf saved as PDF format

.  
. * Histograms of Move Month
. 
. hist pmovm, by(intyr) disc xsc(range(1 12)) xlabel($months) ///
>   xti("Month of prior move") yline(`=1/12') 

. graph export "../results/histmonthall.pdf", as(pdf) replace
file ../results/histmonthall.pdf saved as PDF format

. 
. hist movm if !mi(pmovm), by(intyr) disc xsc(range(1 12)) xlabel($months) ///
>   xti("Month of current move") yline(`=1/12') 

. graph export "../results/histmonthcurrentall.pdf", as(pdf) replace
file ../results/histmonthcurrentall.pdf saved as PDF format

. 
. 
. preserve

. collapse (mean) duration durationy , by(pmovm)

. keep if !mi(pmovm)
(4 observations deleted)

. tw scatter duration pmovm , mcolor(blue) ///
>   || scatter durationy pmovm, mcolor(red) yaxis(2) ///
>   yti("Duration (months)", color(blue)) ///
>   yti("Duration (years)", axis(2) color(red)) ///
>   legend(off) ysc(axis(1) lcolor(blue)) ysc(axis(2) lcolor(red)) ///
>   ylab( , labcolor(blue) tlcolor(blue)) ///
>   ylab( , axis(2) labcolor(red) tlcolor(red)) ///
>   xlab( $months) xti("Prior Move Month")

. graph export pmovmscatter.pdf, as(pdf) replace
file pmovmscatter.pdf saved as PDF format

. 
. restore

. 
. */
. 
. 
. 
. 
. 
. ********************************************************************************
. * REGRESSIONS
. ********************************************************************************
. 
. /* 
>   Regression on Original Data 
> */
.   
. ********************************************************************************
. *  DURATION OF OCCUPANCY
. ********************************************************************************
. 
. * basic regression
. 
. preserve

. keep if  inrange(duration,0,.)   
(429,940 observations deleted)

. // keep observations where current move is not before prior move
. 
. poisson duration summer  , r

Iteration 0:   log pseudolikelihood = -498371.45  
Iteration 1:   log pseudolikelihood = -498371.45  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(1)  =   3.01
                                                        Prob > chi2   = 0.0829
Log pseudolikelihood = -498371.45                       Pseudo R2     = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0094336   .0054401     1.73   0.083    -.0012288    .0200959
       _cons |   3.105104   .0042071   738.06   0.000     3.096859     3.11335
------------------------------------------------------------------------------

. poisson duration2 summer , r

Iteration 0:   log pseudolikelihood = -104672.62  
Iteration 1:   log pseudolikelihood = -104672.62  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(1)  =  24.04
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -104672.62                       Pseudo R2     = 0.0001

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0270775   .0055224     4.90   0.000     .0162539    .0379012
       _cons |   .6019096   .0042713   140.92   0.000      .593538    .6102811
------------------------------------------------------------------------------

. 
. local esttaboptions "tex nomti nodepvars se replace compress label nogaps  nostar eqlabels(none) nonotes"

. 
. foreach var of varlist duration duration2 {
  2.   *estimates clear
.   
. eststo one`var':  poisson `var' summer i.region i.intyr  [pweight=weight] ,r
  3. eststo two`var':  poisson `var' summer i.region  i.intyr  zinc [pweight=weight] ,r
  4. eststo three`var': poisson `var'  summer i.region  i.intyr  zinc  per [pweight=weight] ,r
  5. eststo four`var': poisson `var'  summer i.region  i.intyr zinc per zadult  [pweight=weight] ,r
  6. eststo five`var': poisson `var'  summer i.region  i.intyr zinc per  zadult i.METRO3    [pweight=weight] ,r
  7. eststo six`var':  poisson `var'  summer i.region  i.intyr zinc per  zadult i.METRO3  i.degree  [pweight=we
> ight] ,r
  8. eststo seven`var': poisson `var'  summer i.region   i.intyr  zinc per  zadult i.METRO3  i.degree i.cmsa [p
> weight=weight] ,r
  9. 
. esttab one`var' two`var' three`var' four`var' five`var' six`var' seven`var' using `var'AHSpres.tex, ///
>    `esttaboptions' keep(summer zinc per zadult ) nomti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Degree Days = *.degree" "CMSA fixed effects = *.cmsa"  ///
>    "Year dummies= *.intyr") scalars( N ) ///
>    nonotes
 10. 
. esttab four`var' five`var' six`var' seven`var' using `var'AHSpresRef3.tex, ///
>    `esttaboptions' keep(summer zinc per zadult ) nomti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Degree Days = *.degree" "CMSA fixed effects = *.cmsa"  ///
>    "Year dummies= *.intyr") scalars( N ) ///
>    nonotes   
 11.    
. }

Iteration 0:   log pseudolikelihood = -8.134e+08  
Iteration 1:   log pseudolikelihood = -8.134e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(12) =  79.91
Log pseudolikelihood = -8.134e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0026148    .007009     0.37   0.709    -.0111225    .0163521
             |
      region |
          2  |   -.052342     .01189    -4.40   0.000     -.075646    -.029038
          3  |  -.0446612    .011085    -4.03   0.000    -.0663874   -.0229351
          4  |  -.0432011   .0116086    -3.72   0.000    -.0659536   -.0204486
             |
       intyr |
       2001  |   .0067175   .0134419     0.50   0.617    -.0196281    .0330631
       2002  |   .0048851   .0130455     0.37   0.708    -.0206835    .0304537
       2003  |    .007987   .0132914     0.60   0.548    -.0180636    .0340376
       2004  |   .0521063   .0130381     4.00   0.000     .0265522    .0776604
       2005  |   .0274557   .0132215     2.08   0.038     .0015421    .0533693
       2007  |  -.0339023     .01337    -2.54   0.011    -.0601071   -.0076976
       2009  |  -.0194104   .0134283    -1.45   0.148    -.0457294    .0069086
       2011  |   .0018747   .0132592     0.14   0.888    -.0241129    .0278622
             |
       _cons |   3.142239   .0135063   232.65   0.000     3.115767    3.168711
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -8.036e+08  
Iteration 1:   log pseudolikelihood = -8.036e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(13) = 566.77
Log pseudolikelihood = -8.036e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0022817   .0069345     0.33   0.742    -.0113098    .0158731
             |
      region |
          2  |  -.0371856   .0118352    -3.14   0.002    -.0603822   -.0139889
          3  |  -.0367662   .0110257    -3.33   0.001    -.0583762   -.0151562
          4  |  -.0464906    .011523    -4.03   0.000    -.0690753   -.0239059
             |
       intyr |
       2001  |  -.0039951   .0132963    -0.30   0.764    -.0300553    .0220651
       2002  |  -.0150779   .0129726    -1.16   0.245    -.0405037    .0103479
       2003  |  -.0012736   .0131647    -0.10   0.923     -.027076    .0245288
       2004  |   .0353175   .0129261     2.73   0.006     .0099828    .0606521
       2005  |   .0174196   .0131163     1.33   0.184    -.0082879    .0431272
       2007  |  -.0502025   .0132479    -3.79   0.000     -.076168    -.024237
       2009  |  -.0298465   .0132706    -2.25   0.025    -.0558564   -.0038366
       2011  |  -.0069671   .0131088    -0.53   0.595    -.0326599    .0187257
             |
        zinc |    .084475   .0038345    22.03   0.000     .0769596    .0919905
       _cons |    2.27372   .0421264    53.97   0.000     2.191154    2.356286
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -8.029e+08  
Iteration 1:   log pseudolikelihood = -8.029e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(14) = 630.44
Log pseudolikelihood = -8.029e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0034051   .0069312     0.49   0.623    -.0101798    .0169901
             |
      region |
          2  |  -.0368365    .011819    -3.12   0.002    -.0600014   -.0136716
          3  |  -.0387133   .0110116    -3.52   0.000    -.0602956   -.0171309
          4  |  -.0489806   .0115129    -4.25   0.000    -.0715456   -.0264157
             |
       intyr |
       2001  |  -.0045191   .0132888    -0.34   0.734    -.0305647    .0215265
       2002  |  -.0158202   .0129521    -1.22   0.222    -.0412058    .0095653
       2003  |  -.0012303   .0131464    -0.09   0.925    -.0269968    .0245362
       2004  |   .0370374   .0129072     2.87   0.004     .0117397     .062335
       2005  |   .0171454   .0131013     1.31   0.191    -.0085327    .0428236
       2007  |  -.0500374   .0132342    -3.78   0.000    -.0759759    -.024099
       2009  |    -.03023   .0132443    -2.28   0.022    -.0561883   -.0042717
       2011  |  -.0067624   .0130956    -0.52   0.606    -.0324294    .0189045
             |
        zinc |   .0821695   .0038387    21.41   0.000     .0746457    .0896933
         per |   .0173128   .0023657     7.32   0.000     .0126762    .0219494
       _cons |   2.254012   .0420229    53.64   0.000     2.171649    2.336376
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -8.008e+08  
Iteration 1:   log pseudolikelihood = -8.008e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(15) = 766.01
Log pseudolikelihood = -8.008e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0057498   .0069265     0.83   0.406     -.007826    .0193256
             |
      region |
          2  |  -.0383314   .0118028    -3.25   0.001    -.0614644   -.0151984
          3  |  -.0400556   .0110008    -3.64   0.000    -.0616168   -.0184944
          4  |    -.04735   .0114926    -4.12   0.000     -.069875    -.024825
             |
       intyr |
       2001  |  -.0037274   .0132595    -0.28   0.779    -.0297155    .0222608
       2002  |  -.0117492    .012917    -0.91   0.363     -.037066    .0135676
       2003  |  -.0006854    .013097    -0.05   0.958     -.026355    .0249843
       2004  |   .0350982   .0128674     2.73   0.006     .0098786    .0603178
       2005  |   .0183464   .0130693     1.40   0.160     -.007269    .0439617
       2007  |  -.0482095   .0132078    -3.65   0.000    -.0740963   -.0223228
       2009  |  -.0292278    .013213    -2.21   0.027    -.0551248   -.0033308
       2011  |  -.0037527   .0130962    -0.29   0.774    -.0294209    .0219154
             |
        zinc |   .0882679    .003913    22.56   0.000     .0805985    .0959372
         per |   .0396403   .0029512    13.43   0.000      .033856    .0454247
      zadult |  -.0738517   .0061032   -12.10   0.000    -.0858137   -.0618897
       _cons |   2.260838   .0423637    53.37   0.000     2.177807    2.343869
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -8.002e+08  
Iteration 1:   log pseudolikelihood = -8.002e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 844.69
Log pseudolikelihood = -8.002e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0062441   .0069291     0.90   0.368    -.0073366    .0198248
             |
      region |
          2  |  -.0334568   .0118139    -2.83   0.005    -.0566116   -.0103021
          3  |  -.0388278    .011016    -3.52   0.000    -.0604188   -.0172368
          4  |  -.0440185   .0115125    -3.82   0.000    -.0665826   -.0214544
             |
       intyr |
       2001  |  -.0040831   .0132595    -0.31   0.758    -.0300713     .021905
       2002  |  -.0275198   .0141036    -1.95   0.051    -.0551624    .0001227
       2003  |  -.0009179     .01309    -0.07   0.944    -.0265739     .024738
       2004  |   .0196516   .0144496     1.36   0.174    -.0086691    .0479723
       2005  |   .0183551   .0130639     1.41   0.160    -.0072496    .0439599
       2007  |  -.0488582   .0133094    -3.67   0.000     -.074944   -.0227723
       2009  |  -.0285906   .0132179    -2.16   0.031    -.0544972   -.0026839
       2011  |  -.0048282   .0134577    -0.36   0.720    -.0312049    .0215485
             |
        zinc |   .0842374   .0039702    21.22   0.000     .0764558    .0920189
         per |   .0391074   .0029663    13.18   0.000     .0332936    .0449211
      zadult |  -.0740064   .0061084   -12.12   0.000    -.0859787    -.062034
             |
      METRO3 |
          2  |   .0314608   .0082804     3.80   0.000     .0152314    .0476901
          3  |    .042465   .0133795     3.17   0.002     .0162418    .0686883
          4  |  -.0408643   .0137465    -2.97   0.003    -.0678069   -.0139216
          5  |   .0277482   .0143311     1.94   0.053    -.0003403    .0558368
          7  |   .0435006   .0100055     4.35   0.000     .0238902     .063111
             |
       _cons |   2.287313   .0426732    53.60   0.000     2.203675    2.370951
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -7.995e+08  
Iteration 1:   log pseudolikelihood = -7.995e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(25) = 889.30
Log pseudolikelihood = -7.995e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0060907     .00693     0.88   0.379     -.007492    .0196733
             |
      region |
          2  |  -.0305266   .0118613    -2.57   0.010    -.0537744   -.0072789
          3  |  -.0406459   .0135154    -3.01   0.003    -.0671356   -.0141561
          4  |  -.0555793    .012587    -4.42   0.000    -.0802494   -.0309091
             |
       intyr |
       2001  |  -.0033164    .013264    -0.25   0.803    -.0293134    .0226805
       2002  |  -.0228849   .0142532    -1.61   0.108    -.0508207    .0050509
       2003  |   .0000468   .0130882     0.00   0.997    -.0256056    .0256992
       2004  |   .0230017    .014767     1.56   0.119    -.0059411    .0519445
       2005  |   .0185219   .0130609     1.42   0.156    -.0070769    .0441207
       2007  |  -.0483159   .0133434    -3.62   0.000    -.0744684   -.0221633
       2009  |  -.0278115   .0132165    -2.10   0.035    -.0537153   -.0019078
       2011  |  -.0036693   .0134786    -0.27   0.785    -.0300869    .0227484
             |
        zinc |   .0837823   .0039602    21.16   0.000     .0760205    .0915441
         per |   .0392126   .0029745    13.18   0.000     .0333828    .0450425
      zadult |  -.0742589   .0061054   -12.16   0.000    -.0862253   -.0622925
             |
      METRO3 |
          2  |   .0310431   .0082813     3.75   0.000      .014812    .0472741
          3  |   .0403035   .0133871     3.01   0.003     .0140652    .0665418
          4  |   -.038818   .0138685    -2.80   0.005    -.0659999   -.0116362
          5  |   .0260786   .0145703     1.79   0.073    -.0024787    .0546359
          7  |    .044041   .0104399     4.22   0.000     .0235791    .0645029
             |
      degree |
          2  |   .0294095   .0125965     2.33   0.020     .0047209    .0540982
          3  |   .0294759    .013438     2.19   0.028     .0031378     .055814
          4  |   .0682213   .0150111     4.54   0.000     .0388002    .0976425
          5  |   .0079833   .0175016     0.46   0.648    -.0263192    .0422858
          6  |  -.0023474   .0175905    -0.13   0.894    -.0368242    .0321293
             |
       _cons |   2.266486   .0437833    51.77   0.000     2.180672      2.3523
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -7.993e+08  
Iteration 1:   log pseudolikelihood = -7.993e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(39) = 922.74
Log pseudolikelihood = -7.993e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0063722   .0069285     0.92   0.358    -.0072074    .0199519
             |
      region |
          2  |  -.0281047    .014824    -1.90   0.058    -.0571592    .0009498
          3  |  -.0299524   .0165115    -1.81   0.070    -.0623143    .0024094
          4  |  -.0519169   .0160299    -3.24   0.001     -.083335   -.0204989
             |
       intyr |
       2001  |  -.0031714   .0132615    -0.24   0.811    -.0291634    .0228206
       2002  |  -.0306263   .0151078    -2.03   0.043     -.060237   -.0010156
       2003  |  -9.06e-06   .0130889    -0.00   0.999    -.0256629    .0256448
       2004  |   .0273343   .0158055     1.73   0.084    -.0036439    .0583125
       2005  |   .0194345   .0130664     1.49   0.137    -.0061751    .0450441
       2007  |  -.0481698   .0133629    -3.60   0.000    -.0743606    -.021979
       2009  |   -.026425   .0132363    -2.00   0.046    -.0523677   -.0004823
       2011  |  -.0032343   .0135148    -0.24   0.811    -.0297229    .0232542
             |
        zinc |    .083883   .0039821    21.06   0.000     .0760782    .0916879
         per |   .0391205   .0029739    13.15   0.000     .0332918    .0449493
      zadult |  -.0743959   .0061032   -12.19   0.000     -.086358   -.0624339
             |
      METRO3 |
          2  |   .0304683   .0083322     3.66   0.000     .0141374    .0467991
          3  |   .0436926   .0136384     3.20   0.001     .0169618    .0704234
          4  |  -.0368608   .0140264    -2.63   0.009    -.0643521   -.0093695
          5  |   .0279478   .0147297     1.90   0.058    -.0009219    .0568175
          7  |   .0374542   .0109178     3.43   0.001     .0160556    .0588527
             |
      degree |
          2  |   .0301553   .0136728     2.21   0.027      .003357    .0569536
          3  |   .0282259   .0151999     1.86   0.063    -.0015653    .0580171
          4  |   .0543437   .0172455     3.15   0.002     .0205431    .0881443
          5  |  -.0043996   .0192835    -0.23   0.820    -.0421946    .0333955
          6  |  -.0120407   .0201028    -0.60   0.549    -.0514414    .0273601
             |
        cmsa |
         10  |   .0596939   .0661744     0.90   0.367    -.0700055    .1893933
         31  |    .018326   .0431208     0.42   0.671    -.0661891    .1028411
         34  |   .0157304   .0471337     0.33   0.739      -.07665    .1081108
         41  |   .0889704   .0695343     1.28   0.201    -.0473143     .225255
         47  |  -.0569581   .1100207    -0.52   0.605    -.2725946    .1586784
         49  |   .0652767   .0394724     1.65   0.098    -.0120877    .1426412
         56  |   .0597677   .0451579     1.32   0.186    -.0287403    .1482756
         70  |   .0273612   .0380441     0.72   0.472    -.0472038    .1019263
         78  |  -.0352342    .053391    -0.66   0.509    -.1398787    .0694102
         79  |   .0095773   .0514856     0.19   0.852    -.0913326    .1104872
         80  |   .0319916   .0616082     0.52   0.604    -.0887582    .1527413
         82  |   .0390553   .0506455     0.77   0.441     -.060208    .1383185
         91  |  -.0189092   .0448396    -0.42   0.673    -.1067931    .0689747
         99  |   .0134338   .0352192     0.38   0.703    -.0555946    .0824621
             |
       _cons |   2.248496   .0553815    40.60   0.000      2.13995    2.357042
------------------------------------------------------------------------------
(output written to durationAHSpres.tex)
(output written to durationAHSpresRef3.tex)

Iteration 0:   log pseudolikelihood = -1.701e+08  
Iteration 1:   log pseudolikelihood = -1.701e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(12) =  86.57
Log pseudolikelihood = -1.701e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0201191   .0071312     2.82   0.005     .0061422     .034096
             |
      region |
          2  |  -.0492499   .0120881    -4.07   0.000    -.0729422   -.0255576
          3  |  -.0437983   .0113009    -3.88   0.000    -.0659477   -.0216489
          4  |  -.0422092   .0118699    -3.56   0.000    -.0654738   -.0189445
             |
       intyr |
       2001  |   .0165899   .0139037     1.19   0.233    -.0106609    .0438407
       2002  |   .0212456   .0134862     1.58   0.115    -.0051868     .047678
       2003  |   .0304456   .0136457     2.23   0.026     .0037005    .0571906
       2004  |   .0682522   .0134271     5.08   0.000     .0419356    .0945687
       2005  |   .0475872   .0135009     3.52   0.000     .0211258    .0740485
       2007  |  -.0121003   .0137563    -0.88   0.379    -.0390622    .0148616
       2009  |   -.001382   .0137931    -0.10   0.920    -.0284159     .025652
       2011  |    .010937   .0137349     0.80   0.426     -.015983    .0378569
             |
       _cons |   .6232429    .013976    44.59   0.000     .5958504    .6506355
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -1.693e+08  
Iteration 1:   log pseudolikelihood = -1.693e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(13) = 537.57
Log pseudolikelihood = -1.693e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0198011   .0070621     2.80   0.005     .0059598    .0336425
             |
      region |
          2  |  -.0346022   .0120428    -2.87   0.004    -.0582057   -.0109987
          3  |  -.0361769   .0112486    -3.22   0.001    -.0582237   -.0141301
          4  |  -.0454262   .0117931    -3.85   0.000    -.0685403   -.0223122
             |
       intyr |
       2001  |   .0062267   .0137491     0.45   0.651     -.020721    .0331744
       2002  |   .0019224    .013399     0.14   0.886    -.0243391     .028184
       2003  |    .021485   .0135187     1.59   0.112    -.0050112    .0479812
       2004  |    .051995   .0133144     3.91   0.000     .0258993    .0780908
       2005  |   .0378936   .0133906     2.83   0.005     .0116486    .0641386
       2007  |  -.0278531    .013637    -2.04   0.041    -.0545811   -.0011251
       2009  |  -.0114541   .0136456    -0.84   0.401     -.038199    .0152908
       2011  |   .0024188   .0135797     0.18   0.859    -.0241968    .0290345
             |
        zinc |   .0816795   .0038376    21.28   0.000     .0741579    .0892012
       _cons |  -.2163932   .0422778    -5.12   0.000    -.2992562   -.1335303
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -1.693e+08  
Iteration 1:   log pseudolikelihood = -1.693e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(14) = 595.27
Log pseudolikelihood = -1.693e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0208946   .0070602     2.96   0.003     .0070569    .0347323
             |
      region |
          2  |  -.0342628   .0120298    -2.85   0.004    -.0578408   -.0106848
          3  |  -.0380729    .011238    -3.39   0.001    -.0600989   -.0160469
          4  |  -.0478442   .0117887    -4.06   0.000    -.0709497   -.0247388
             |
       intyr |
       2001  |   .0057099   .0137396     0.42   0.678    -.0212191    .0326389
       2002  |   .0011932    .013378     0.09   0.929    -.0250272    .0274136
       2003  |    .021527   .0135001     1.59   0.111    -.0049326    .0479867
       2004  |   .0536571   .0132958     4.04   0.000     .0275978    .0797164
       2005  |   .0376224   .0133739     2.81   0.005       .01141    .0638349
       2007  |  -.0276993   .0136246    -2.03   0.042     -.054403   -.0009956
       2009  |   -.011827   .0136185    -0.87   0.385    -.0385187    .0148648
       2011  |   .0026068   .0135674     0.19   0.848    -.0239848    .0291984
             |
        zinc |   .0794452   .0038436    20.67   0.000     .0719119    .0869784
         per |   .0168294   .0024113     6.98   0.000     .0121034    .0215554
       _cons |   -.235609   .0421795    -5.59   0.000    -.3182793   -.1529387
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -1.691e+08  
Iteration 1:   log pseudolikelihood = -1.691e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(15) = 731.76
Log pseudolikelihood = -1.691e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0232934   .0070546     3.30   0.001     .0094667    .0371201
             |
      region |
          2  |   -.035774   .0120187    -2.98   0.003    -.0593302   -.0122179
          3  |  -.0394441   .0112335    -3.51   0.000    -.0614614   -.0174269
          4  |  -.0461765   .0117694    -3.92   0.000    -.0692441    -.023109
             |
       intyr |
       2001  |   .0065191   .0137073     0.48   0.634    -.0203466    .0333849
       2002  |   .0053395   .0133382     0.40   0.689    -.0208029    .0314819
       2003  |   .0220893   .0134453     1.64   0.100    -.0042629    .0484415
       2004  |   .0516755   .0132473     3.90   0.000     .0257113    .0776398
       2005  |   .0388486   .0133346     2.91   0.004     .0127134    .0649839
       2007  |  -.0258326   .0135938    -1.90   0.057    -.0524759    .0008107
       2009  |     -.0108   .0135858    -0.79   0.427    -.0374276    .0158276
       2011  |   .0056822    .013565     0.42   0.675    -.0209047     .032269
             |
        zinc |   .0856399   .0039183    21.86   0.000     .0779602    .0933195
         per |   .0396119   .0030137    13.14   0.000     .0337052    .0455186
      zadult |  -.0753656   .0062009   -12.15   0.000    -.0875191   -.0632121
       _cons |   -.228366   .0425301    -5.37   0.000    -.3117234   -.1450086
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -1.691e+08  
Iteration 1:   log pseudolikelihood = -1.691e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 802.42
Log pseudolikelihood = -1.691e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0238404   .0070559     3.38   0.001     .0100111    .0376698
             |
      region |
          2  |  -.0305091   .0120331    -2.54   0.011    -.0540934   -.0069247
          3  |  -.0381532   .0112435    -3.39   0.001    -.0601901   -.0161163
          4  |  -.0423727   .0117948    -3.59   0.000    -.0654901   -.0192553
             |
       intyr |
       2001  |   .0060768   .0137006     0.44   0.657    -.0207759    .0329295
       2002  |  -.0056933   .0145162    -0.39   0.695    -.0341446    .0227579
       2003  |   .0218748   .0134381     1.63   0.104    -.0044635     .048213
       2004  |   .0414494   .0148262     2.80   0.005     .0123905    .0705082
       2005  |   .0388508   .0133272     2.92   0.004     .0127299    .0649717
       2007  |  -.0259416   .0136877    -1.90   0.058     -.052769    .0008858
       2009  |  -.0099478   .0135942    -0.73   0.464    -.0365919    .0166964
       2011  |   .0056394   .0139244     0.41   0.685     -.021652    .0329308
             |
        zinc |   .0813949   .0039694    20.51   0.000      .073615    .0891748
         per |   .0390413   .0030292    12.89   0.000     .0331042    .0449784
      zadult |  -.0755261    .006206   -12.17   0.000    -.0876896   -.0633627
             |
      METRO3 |
          2  |   .0336119    .008412     4.00   0.000     .0171247     .050099
          3  |   .0522808   .0135075     3.87   0.000     .0258065    .0787551
          4  |  -.0377062   .0140226    -2.69   0.007    -.0651898   -.0102225
          5  |   .0247505   .0147462     1.68   0.093    -.0041515    .0536526
          7  |   .0384822   .0102047     3.77   0.000     .0184814     .058483
             |
       _cons |  -.2016047   .0427606    -4.71   0.000     -.285414   -.1177954
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -1.690e+08  
Iteration 1:   log pseudolikelihood = -1.690e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(25) = 845.28
Log pseudolikelihood = -1.690e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0234834   .0070554     3.33   0.001     .0096552    .0373116
             |
      region |
          2  |  -.0281804   .0120743    -2.33   0.020    -.0518456   -.0045152
          3  |  -.0345084   .0137937    -2.50   0.012    -.0615435   -.0074733
          4  |  -.0516915   .0128686    -4.02   0.000    -.0769134   -.0264695
             |
       intyr |
       2001  |   .0068487   .0137064     0.50   0.617    -.0200155    .0337128
       2002  |  -.0001307    .014662    -0.01   0.993    -.0288678    .0286063
       2003  |   .0228469   .0134409     1.70   0.089    -.0034968    .0491906
       2004  |   .0429001   .0151166     2.84   0.005     .0132721    .0725282
       2005  |   .0390162   .0133266     2.93   0.003     .0128966    .0651357
       2007  |  -.0255887   .0137181    -1.87   0.062    -.0524757    .0012982
       2009  |  -.0092038   .0135961    -0.68   0.498    -.0358516    .0174441
       2011  |   .0066829   .0139413     0.48   0.632    -.0206415    .0340073
             |
        zinc |   .0809084   .0039597    20.43   0.000     .0731476    .0886692
         per |   .0392284   .0030385    12.91   0.000     .0332731    .0451837
      zadult |   -.075761   .0062015   -12.22   0.000    -.0879157   -.0636063
             |
      METRO3 |
          2  |    .033257   .0084123     3.95   0.000     .0167692    .0497448
          3  |   .0497737   .0135173     3.68   0.000     .0232803    .0762671
          4  |  -.0374764   .0141452    -2.65   0.008    -.0652004   -.0097524
          5  |    .021282   .0150137     1.42   0.156    -.0081443    .0507082
          7  |   .0377889   .0106606     3.54   0.000     .0168944    .0586834
             |
      degree |
          2  |   .0222424    .012747     1.74   0.081    -.0027412     .047226
          3  |   .0226373   .0136249     1.66   0.097     -.004067    .0493415
          4  |   .0576409   .0152841     3.77   0.000     .0276846    .0875971
          5  |  -.0076702   .0177947    -0.43   0.666    -.0425472    .0272067
          6  |  -.0140881    .017825    -0.79   0.429    -.0490245    .0208482
             |
       _cons |  -.2157325    .043811    -4.92   0.000    -.3016004   -.1298645
------------------------------------------------------------------------------

Iteration 0:   log pseudolikelihood = -1.690e+08  
Iteration 1:   log pseudolikelihood = -1.690e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(39) = 871.88
Log pseudolikelihood = -1.690e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0236284   .0070558     3.35   0.001     .0097993    .0374575
             |
      region |
          2  |  -.0266219   .0152209    -1.75   0.080    -.0564544    .0032105
          3  |  -.0264645   .0169348    -1.56   0.118    -.0596562    .0067272
          4  |  -.0470124    .016459    -2.86   0.004    -.0792714   -.0147534
             |
       intyr |
       2001  |   .0069903   .0137064     0.51   0.610    -.0198738    .0338544
       2002  |  -.0065496   .0155102    -0.42   0.673     -.036949    .0238497
       2003  |   .0228216   .0134432     1.70   0.090    -.0035267    .0491698
       2004  |   .0479167   .0162203     2.95   0.003     .0161254     .079708
       2005  |    .039672   .0133372     2.97   0.003     .0135316    .0658124
       2007  |   -.025313   .0137393    -1.84   0.065    -.0522415    .0016154
       2009  |  -.0078651    .013623    -0.58   0.564    -.0345657    .0188356
       2011  |   .0065747   .0139762     0.47   0.638    -.0208182    .0339676
             |
        zinc |    .080818   .0039794    20.31   0.000     .0730186    .0886174
         per |   .0390941   .0030383    12.87   0.000     .0331391    .0450491
      zadult |  -.0758349   .0062013   -12.23   0.000    -.0879891   -.0636806
             |
      METRO3 |
          2  |   .0335383   .0084628     3.96   0.000     .0169516     .050125
          3  |   .0518926   .0137835     3.76   0.000     .0248775    .0789077
          4  |  -.0362853   .0143058    -2.54   0.011    -.0643242   -.0082463
          5  |   .0225075   .0151771     1.48   0.138    -.0072391    .0522542
          7  |   .0360988   .0111639     3.23   0.001      .014218    .0579796
             |
      degree |
          2  |   .0217921   .0138265     1.58   0.115    -.0053073    .0488915
          3  |   .0209931   .0153591     1.37   0.172    -.0091101    .0510963
          4  |    .046277   .0175197     2.64   0.008      .011939    .0806149
          5  |  -.0147655   .0195547    -0.76   0.450    -.0530921     .023561
          6  |  -.0243431   .0203378    -1.20   0.231    -.0642044    .0155182
             |
        cmsa |
         10  |   .0175885   .0685621     0.26   0.798    -.1167907    .1519677
         31  |   .0273732   .0431555     0.63   0.526    -.0572101    .1119566
         34  |   .0075662   .0476131     0.16   0.874    -.0857537    .1008862
         41  |    .092546   .0693067     1.34   0.182    -.0432926    .2283846
         47  |  -.0298191    .118739    -0.25   0.802    -.2625432     .202905
         49  |   .0507952   .0396356     1.28   0.200    -.0268891    .1284795
         56  |   .0244224   .0456352     0.54   0.593     -.065021    .1138658
         70  |   .0323231   .0379704     0.85   0.395    -.0420975    .1067437
         78  |  -.0320106   .0542223    -0.59   0.555    -.1382843    .0742631
         79  |   .0283128   .0518558     0.55   0.585    -.0733227    .1299483
         80  |   .0337659   .0619293     0.55   0.586    -.0876133     .155145
         82  |   .0345174   .0514193     0.67   0.502    -.0662625    .1352974
         91  |  -.0323655   .0457588    -0.71   0.479     -.122051      .05732
         99  |   .0164714   .0351452     0.47   0.639    -.0524119    .0853547
             |
       _cons |  -.2330665    .055029    -4.24   0.000    -.3409213   -.1252118
------------------------------------------------------------------------------
(output written to duration2AHSpres.tex)
(output written to duration2AHSpresRef3.tex)

. 
. * Construct combined table:
. 
. local esttaboptions "tex nomti nodepvars se compress label nogaps  nostar eqlabels(none) nonotes"

. 
. esttab *duration using combined.tex, `esttaboptions' keep(summer) frag  coeflabel(summer  "Duration (Months)"
> )  noobs replace
(output written to combined.tex)

. 
. esttab *duration2 using combined.tex, `esttaboptions' keep(summer) frag    coeflabel(summer  "Duration (Years
> )")  noobs append nonum  
(output written to combined.tex)

. 
. esttab *duration2 using combined.tex, `esttaboptions' frag  indicate("(log) Income = zinc" "HH size = per" "N
> um. adults = zadult" "Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3"  "Degree Days
>  = *.degree" "CMSA fixed effects = *.cmsa"  "Year dummies= *.intyr")  drop(*) scalars( N )  append nonum  
(output written to combined.tex)

. 
. 
. 
. ********************************************************************************
. * Duration regressions
. * Year-by-year  
. ********************************************************************************
. 
. 
. * controls to replicate column (5) from Ngai-Tenreyro 
. local col5controls "zinc per zadult i.region i.METRO3 "

. 
. 
. tempname topost

. postfile `topost' intyr summer_b summer_se str12 depvar using "duration_regs.dta", replace

. 
. foreach yr in `intyr_levels' {
  2.   eststo month`yr' : poisson duration summer `col5controls' if intyr == `yr' [pw=weight] , r 
  3.   estadd local year `yr'
  4.   post `topost' (`yr') (_b[summer]) (_se[summer]) (e(depvar))
  5.   
.   eststo year`yr' : poisson duration2 summer `col5controls' if intyr == `yr' [pw=weight] , r
  6.   estadd local year `yr'
  7.   post `topost' (`yr') (_b[summer]) (_se[summer]) (e(depvar))
  8. }

Iteration 0:   log pseudolikelihood = -1.223e+08  
Iteration 1:   log pseudolikelihood = -1.223e+08  

Poisson regression                                      Number of obs =  6,688
                                                        Wald chi2(11) = 150.49
Log pseudolikelihood = -1.223e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0267888    .019037     1.41   0.159     -.010523    .0641006
        zinc |   .0861777   .0117225     7.35   0.000      .063202    .1091534
         per |   .0598332   .0078377     7.63   0.000     .0444715    .0751948
      zadult |  -.0884936   .0169916    -5.21   0.000    -.1217965   -.0551907
             |
      region |
          2  |  -.0060892    .029392    -0.21   0.836    -.0636965    .0515181
          3  |  -.0157238   .0277189    -0.57   0.571    -.0700517    .0386042
          4  |   -.070808   .0304646    -2.32   0.020    -.1305174   -.0110986
             |
      METRO3 |
          2  |   .0302818   .0210569     1.44   0.150     -.010989    .0715527
          3  |   .0340662   .0357349     0.95   0.340    -.0359728    .1041053
          4  |  -.0796359   .0351377    -2.27   0.023    -.1485046   -.0107672
          5  |   .0089913   .0427478     0.21   0.833    -.0747928    .0927753
             |
       _cons |   2.225961   .1210026    18.40   0.000     1.988801    2.463122
------------------------------------------------------------------------------

added macro:
               e(year) : "1999"

Iteration 0:   log pseudolikelihood =  -24990629  
Iteration 1:   log pseudolikelihood =  -24990629  

Poisson regression                                      Number of obs =  6,688
                                                        Wald chi2(11) = 160.20
Log pseudolikelihood = -24990629                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0512526   .0199389     2.57   0.010     .0121731    .0903321
        zinc |   .0937085   .0118645     7.90   0.000     .0704546    .1169625
         per |   .0612984   .0082698     7.41   0.000     .0450899    .0775069
      zadult |  -.0942304   .0176228    -5.35   0.000    -.1287705   -.0596902
             |
      region |
          2  |  -.0078399   .0301904    -0.26   0.795     -.067012    .0513322
          3  |  -.0178304    .028632    -0.62   0.533    -.0739482    .0382873
          4  |  -.0766058   .0321357    -2.38   0.017    -.1395905    -.013621
             |
      METRO3 |
          2  |   .0348437   .0217526     1.60   0.109    -.0077906     .077478
          3  |   .0582175   .0357599     1.63   0.104    -.0118707    .1283057
          4  |   -.072847   .0362571    -2.01   0.045    -.1439096   -.0017844
          5  |   .0057193   .0477071     0.12   0.905    -.0877848    .0992235
             |
       _cons |  -.3687912   .1227085    -3.01   0.003    -.6092955    -.128287
------------------------------------------------------------------------------

added macro:
               e(year) : "1999"

Iteration 0:   log pseudolikelihood = -1.108e+08  
Iteration 1:   log pseudolikelihood = -1.108e+08  

Poisson regression                                      Number of obs =  5,760
                                                        Wald chi2(11) = 104.65
Log pseudolikelihood = -1.108e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |  -.0025517   .0191157    -0.13   0.894    -.0400178    .0349144
        zinc |   .1011938   .0129533     7.81   0.000     .0758058    .1265818
         per |   .0377006   .0086509     4.36   0.000     .0207451    .0546562
      zadult |  -.0785508   .0172871    -4.54   0.000    -.1124329   -.0446687
             |
      region |
          2  |  -.0129957   .0321701    -0.40   0.686     -.076048    .0500566
          3  |  -.0285383   .0307697    -0.93   0.354    -.0888457    .0317691
          4  |  -.0459145   .0309296    -1.48   0.138    -.1065354    .0147063
             |
      METRO3 |
          2  |  -.0026014   .0213161    -0.12   0.903    -.0443803    .0391774
          3  |   .0153539   .0356832     0.43   0.667    -.0545838    .0852917
          4  |   -.067572   .0355622    -1.90   0.057    -.1372727    .0021287
          5  |   -.037474   .0366561    -1.02   0.307    -.1093186    .0343707
             |
       _cons |   2.138551   .1391987    15.36   0.000     1.865726    2.411375
------------------------------------------------------------------------------

added macro:
               e(year) : "2001"

Iteration 0:   log pseudolikelihood =  -23628263  
Iteration 1:   log pseudolikelihood =  -23628263  

Poisson regression                                      Number of obs =  5,760
                                                        Wald chi2(11) = 108.95
Log pseudolikelihood = -23628263                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0217354   .0196058     1.11   0.268    -.0166912     .060162
        zinc |   .1019904   .0127537     8.00   0.000     .0769935    .1269872
         per |   .0396375   .0089181     4.44   0.000     .0221585    .0571166
      zadult |  -.0847854   .0173673    -4.88   0.000    -.1188246   -.0507461
             |
      region |
          2  |   -.005425   .0335066    -0.16   0.871    -.0710967    .0602467
          3  |  -.0149987   .0318835    -0.47   0.638    -.0774892    .0474918
          4  |  -.0372163   .0319962    -1.16   0.245    -.0999276    .0254951
             |
      METRO3 |
          2  |   .0031926   .0216323     0.15   0.883     -.039206    .0455911
          3  |   .0332736   .0369196     0.90   0.367    -.0390876    .1056348
          4  |  -.0696081   .0373543    -1.86   0.062    -.1428212     .003605
          5  |   -.034756   .0375033    -0.93   0.354     -.108261     .038749
             |
       _cons |  -.3890069   .1377423    -2.82   0.005    -.6589769    -.119037
------------------------------------------------------------------------------

added macro:
               e(year) : "2001"

Iteration 0:   log pseudolikelihood =  -14812287  
Iteration 1:   log pseudolikelihood =  -14812287  

Poisson regression                                      Number of obs =  8,780
                                                        Wald chi2(10) = 100.20
Log pseudolikelihood = -14812287                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0235882   .0177947     1.33   0.185    -.0112888    .0584652
        zinc |   .0668193   .0103555     6.45   0.000     .0465229    .0871157
         per |   .0336665   .0075402     4.46   0.000      .018888    .0484451
      zadult |  -.0568613   .0153712    -3.70   0.000    -.0869883   -.0267343
             |
      region |
          2  |   -.065546   .0469496    -1.40   0.163    -.1575655    .0264735
          3  |  -.0875872   .0472263    -1.85   0.064    -.1801491    .0049747
          4  |  -.0295451   .0469438    -0.63   0.529    -.1215533    .0624632
             |
      METRO3 |
          2  |    .014967   .0350617     0.43   0.669    -.0537526    .0836867
          3  |  -.0820634   .0733157    -1.12   0.263    -.2257596    .0616328
          7  |   .0436449   .0187948     2.32   0.020     .0068079     .080482
             |
       _cons |   2.434908   .1077416    22.60   0.000     2.223738    2.646077
------------------------------------------------------------------------------

added macro:
               e(year) : "2002"

Iteration 0:   log pseudolikelihood = -3168825.2  
Iteration 1:   log pseudolikelihood = -3168825.2  

Poisson regression                                      Number of obs =  8,780
                                                        Wald chi2(10) = 106.07
Log pseudolikelihood = -3168825.2                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0453325    .018115     2.50   0.012     .0098278    .0808373
        zinc |   .0659758   .0102377     6.44   0.000     .0459102    .0860413
         per |   .0318595   .0077912     4.09   0.000     .0165891    .0471299
      zadult |  -.0556004   .0155588    -3.57   0.000    -.0860952   -.0251057
             |
      region |
          2  |  -.0720229   .0471595    -1.53   0.127    -.1644539     .020408
          3  |  -.0950742   .0474019    -2.01   0.045    -.1879801   -.0021682
          4  |  -.0329181   .0470884    -0.70   0.485    -.1252096    .0593734
             |
      METRO3 |
          2  |   .0088371   .0358743     0.25   0.805    -.0614752    .0791494
          3  |  -.0900785    .077916    -1.16   0.248    -.2427911    .0626342
          7  |   .0424708   .0190686     2.23   0.026     .0050971    .0798445
             |
       _cons |  -.0512028   .1062792    -0.48   0.630    -.2595063    .1571006
------------------------------------------------------------------------------

added macro:
               e(year) : "2002"

Iteration 0:   log pseudolikelihood = -1.014e+08  
Iteration 1:   log pseudolikelihood = -1.014e+08  

Poisson regression                                      Number of obs =  5,876
                                                        Wald chi2(11) = 156.93
Log pseudolikelihood = -1.014e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0121268   .0184877     0.66   0.512    -.0241084    .0483619
        zinc |   .0803647   .0106492     7.55   0.000     .0594927    .1012367
         per |   .0460421   .0080342     5.73   0.000     .0302954    .0617888
      zadult |  -.1162651   .0171616    -6.77   0.000    -.1499013   -.0826289
             |
      region |
          2  |  -.0895707   .0313677    -2.86   0.004    -.1510504   -.0280911
          3  |  -.0873457   .0293153    -2.98   0.003    -.1448025   -.0298888
          4  |  -.0671008   .0302189    -2.22   0.026    -.1263288   -.0078729
             |
      METRO3 |
          2  |   .0378113   .0214534     1.76   0.078    -.0042365    .0798591
          3  |   .1195275   .0327301     3.65   0.000     .0553777    .1836772
          4  |  -.0589665   .0380851    -1.55   0.122    -.1336119    .0156789
          5  |   .0485555   .0335529     1.45   0.148    -.0172069    .1143179
             |
       _cons |   2.404406   .1148227    20.94   0.000     2.179358    2.629454
------------------------------------------------------------------------------

added macro:
               e(year) : "2003"

Iteration 0:   log pseudolikelihood =  -21603771  
Iteration 1:   log pseudolikelihood =  -21603771  

Poisson regression                                      Number of obs =  5,876
                                                        Wald chi2(11) = 142.70
Log pseudolikelihood = -21603771                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0311276   .0186942     1.67   0.096    -.0055123    .0677674
        zinc |   .0738659   .0104371     7.08   0.000     .0534095    .0943223
         per |   .0460666   .0081211     5.67   0.000     .0301495    .0619837
      zadult |   -.114096   .0175424    -6.50   0.000    -.1484784   -.0797135
             |
      region |
          2  |   -.080573    .031477    -2.56   0.010    -.1422667   -.0188792
          3  |  -.0825464   .0297071    -2.78   0.005    -.1407712   -.0243216
          4  |  -.0635379   .0307647    -2.07   0.039    -.1238357   -.0032401
             |
      METRO3 |
          2  |   .0348131   .0216657     1.61   0.108     -.007651    .0772772
          3  |   .1130617   .0325772     3.47   0.001     .0492115    .1769118
          4  |  -.0548137   .0382115    -1.43   0.151    -.1297069    .0200795
          5  |     .03711   .0342598     1.08   0.279    -.0300381    .1042581
             |
       _cons |  -.0303826   .1123054    -0.27   0.787    -.2504972     .189732
------------------------------------------------------------------------------

added macro:
               e(year) : "2003"

Iteration 0:   log pseudolikelihood =  -10735218  
Iteration 1:   log pseudolikelihood =  -10735218  

Poisson regression                                      Number of obs =  6,470
                                                        Wald chi2(8)  = 127.43
Log pseudolikelihood = -10735218                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0019424   .0178428     0.11   0.913    -.0330287    .0369136
        zinc |   .0788331   .0101881     7.74   0.000     .0588649    .0988013
         per |   .0449846   .0072967     6.17   0.000     .0306832    .0592859
      zadult |  -.0790377   .0165414    -4.78   0.000    -.1114581   -.0466172
             |
      region |
          2  |  -.0043004   .0309993    -0.14   0.890    -.0650578    .0564571
          3  |   .0098708   .0301461     0.33   0.743    -.0492146    .0689561
          4  |  -.0787926   .0293592    -2.68   0.007    -.1363357   -.0212495
             |
    7.METRO3 |   .0364862   .0186134     1.96   0.050     4.72e-06    .0729678
       _cons |   2.352163    .108633    21.65   0.000     2.139246     2.56508
------------------------------------------------------------------------------

added macro:
               e(year) : "2004"

Iteration 0:   log pseudolikelihood = -2299299.8  
Iteration 1:   log pseudolikelihood = -2299299.8  

Poisson regression                                      Number of obs =  6,470
                                                        Wald chi2(8)  = 119.14
Log pseudolikelihood = -2299299.8                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0236663   .0180747     1.31   0.190    -.0117596    .0590922
        zinc |   .0734567   .0101911     7.21   0.000     .0534826    .0934308
         per |   .0474716   .0073364     6.47   0.000     .0330926    .0618507
      zadult |  -.0837183   .0164538    -5.09   0.000    -.1159672   -.0514695
             |
      region |
          2  |  -.0089844   .0313219    -0.29   0.774    -.0703742    .0524054
          3  |  -.0006393   .0304916    -0.02   0.983    -.0604017    .0591231
          4  |  -.0810812   .0297244    -2.73   0.006    -.1393398   -.0228225
             |
    7.METRO3 |   .0256373   .0188018     1.36   0.173    -.0112136    .0624882
       _cons |    -.08093   .1086788    -0.74   0.456    -.2939364    .1320765
------------------------------------------------------------------------------

added macro:
               e(year) : "2004"

Iteration 0:   log pseudolikelihood = -1.232e+08  
Iteration 1:   log pseudolikelihood = -1.232e+08  

Poisson regression                                      Number of obs =  6,047
                                                        Wald chi2(11) =  96.70
Log pseudolikelihood = -1.232e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |  -.0183235   .0184316    -0.99   0.320    -.0544488    .0178017
        zinc |   .0742334   .0111035     6.69   0.000      .052471    .0959958
         per |   .0416487    .007982     5.22   0.000     .0260042    .0572931
      zadult |  -.0837608    .017756    -4.72   0.000    -.1185619   -.0489598
             |
      region |
          2  |  -.0270726   .0313095    -0.86   0.387    -.0884381    .0342928
          3  |  -.0490246   .0286761    -1.71   0.087    -.1052288    .0071796
          4  |  -.0333347   .0298047    -1.12   0.263    -.0917508    .0250815
             |
      METRO3 |
          2  |   .0382646   .0216029     1.77   0.077    -.0040762    .0806054
          3  |   .0419569   .0324567     1.29   0.196    -.0216571    .1055709
          4  |  -.0475875   .0349123    -1.36   0.173    -.1160143    .0208393
          5  |   .0390617    .035118     1.11   0.266    -.0297683    .1078917
             |
       _cons |   2.430917     .11489    21.16   0.000     2.205736    2.656097
------------------------------------------------------------------------------

added macro:
               e(year) : "2005"

Iteration 0:   log pseudolikelihood =  -25426890  
Iteration 1:   log pseudolikelihood =  -25426890  

Poisson regression                                      Number of obs =  6,047
                                                        Wald chi2(11) =  87.81
Log pseudolikelihood = -25426890                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |    -.00671   .0182673    -0.37   0.713    -.0425133    .0290933
        zinc |   .0680676   .0111351     6.11   0.000     .0462432    .0898919
         per |   .0422629   .0079841     5.29   0.000     .0266143    .0579116
      zadult |  -.0881312   .0177471    -4.97   0.000     -.122915   -.0533475
             |
      region |
          2  |  -.0306085   .0311651    -0.98   0.326    -.0916911     .030474
          3  |   -.054973   .0284472    -1.93   0.053    -.1107285    .0007824
          4  |  -.0411814   .0298373    -1.38   0.168    -.0996613    .0172986
             |
      METRO3 |
          2  |   .0357787   .0215742     1.66   0.097    -.0065059    .0780633
          3  |   .0405605     .03243     1.25   0.211    -.0230011     .104122
          4  |  -.0425136   .0345982    -1.23   0.219    -.1103249    .0252976
          5  |   .0355881   .0339376     1.05   0.294    -.0309284    .1021045
             |
       _cons |   .0128586   .1144524     0.11   0.911     -.211464    .2371813
------------------------------------------------------------------------------

added macro:
               e(year) : "2005"

Iteration 0:   log pseudolikelihood = -1.182e+08  
Iteration 1:   log pseudolikelihood = -1.182e+08  

Poisson regression                                      Number of obs =  6,737
                                                        Wald chi2(12) = 133.09
Log pseudolikelihood = -1.182e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |  -.0138537   .0188621    -0.73   0.463    -.0508226    .0231153
        zinc |   .0847911   .0098735     8.59   0.000     .0654394    .1041428
         per |   .0273574   .0080779     3.39   0.001     .0115249    .0431899
      zadult |  -.0503697   .0158869    -3.17   0.002    -.0815074   -.0192319
             |
      region |
          2  |  -.0773477   .0327837    -2.36   0.018    -.1416025   -.0130928
          3  |  -.0846977   .0292655    -2.89   0.004     -.142057   -.0273384
          4  |  -.0654649   .0329961    -1.98   0.047     -.130136   -.0007937
             |
      METRO3 |
          2  |   .0635717   .0231357     2.75   0.006     .0182266    .1089168
          3  |   .0585858   .0358324     1.63   0.102    -.0116445    .1288161
          4  |   .0124127   .0383729     0.32   0.746    -.0627969    .0876222
          5  |   .0156509   .0374669     0.42   0.676    -.0577828    .0890847
          7  |   .0718602   .0255422     2.81   0.005     .0217984     .121922
             |
       _cons |   2.249237   .1067415    21.07   0.000     2.040027    2.458446
------------------------------------------------------------------------------

added macro:
               e(year) : "2007"

Iteration 0:   log pseudolikelihood =  -25244755  
Iteration 1:   log pseudolikelihood =  -25244755  

Poisson regression                                      Number of obs =  6,737
                                                        Wald chi2(12) = 113.75
Log pseudolikelihood = -25244755                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0017157   .0191452     0.09   0.929    -.0358082    .0392396
        zinc |   .0785188   .0099044     7.93   0.000     .0591065    .0979311
         per |   .0244731   .0082141     2.98   0.003     .0083738    .0405724
      zadult |  -.0502274   .0160937    -3.12   0.002    -.0817704   -.0186844
             |
      region |
          2  |  -.0709135   .0332127    -2.14   0.033    -.1360092   -.0058179
          3  |  -.0797372   .0296606    -2.69   0.007    -.1378709   -.0216035
          4  |  -.0613859    .033528    -1.83   0.067    -.1270996    .0043279
             |
      METRO3 |
          2  |    .067345   .0234542     2.87   0.004     .0213756    .1133143
          3  |   .0737295   .0352082     2.09   0.036     .0047227    .1427364
          4  |   .0098122   .0397281     0.25   0.805    -.0680534    .0876779
          5  |    .013987   .0377274     0.37   0.711    -.0599574    .0879313
          7  |   .0677785   .0259543     2.61   0.009      .016909    .1186481
             |
       _cons |  -.1791472   .1071842    -1.67   0.095    -.3892243    .0309299
------------------------------------------------------------------------------

added macro:
               e(year) : "2007"

Iteration 0:   log pseudolikelihood = -1.079e+08  
Iteration 1:   log pseudolikelihood = -1.079e+08  

Poisson regression                                      Number of obs =  6,310
                                                        Wald chi2(12) = 130.97
Log pseudolikelihood = -1.079e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0414156   .0189645     2.18   0.029     .0042458    .0785854
        zinc |   .0825923   .0094779     8.71   0.000     .0640159    .1011687
         per |   .0372692   .0075602     4.93   0.000     .0224514    .0520869
      zadult |  -.0715846   .0157085    -4.56   0.000    -.1023727   -.0407965
             |
      region |
          2  |   .0215129   .0324155     0.66   0.507    -.0420203    .0850462
          3  |   .0350746   .0307332     1.14   0.254    -.0251614    .0953107
          4  |   .0361471   .0322621     1.12   0.263    -.0270855    .0993798
             |
      METRO3 |
          2  |   .0500639   .0220229     2.27   0.023     .0068998     .093228
          3  |   .0130583   .0359054     0.36   0.716     -.057315    .0834317
          4  |  -.0470099   .0353286    -1.33   0.183    -.1162527     .022233
          5  |   .0754048   .0365709     2.06   0.039     .0037272    .1470824
          7  |    .018893   .0410347     0.46   0.645    -.0615335    .0993196
             |
       _cons |   2.186368   .1018812    21.46   0.000     1.986685    2.386052
------------------------------------------------------------------------------

added macro:
               e(year) : "2009"

Iteration 0:   log pseudolikelihood =  -23211540  
Iteration 1:   log pseudolikelihood =  -23211540  

Poisson regression                                      Number of obs =  6,310
                                                        Wald chi2(12) = 112.13
Log pseudolikelihood = -23211540                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0551811   .0191809     2.88   0.004     .0175872     .092775
        zinc |   .0738724    .009482     7.79   0.000      .055288    .0924568
         per |   .0358866   .0076832     4.67   0.000     .0208279    .0509454
      zadult |  -.0679405    .016123    -4.21   0.000    -.0995411     -.03634
             |
      region |
          2  |   .0170783   .0327894     0.52   0.602    -.0471878    .0813444
          3  |   .0335712   .0310868     1.08   0.280    -.0273579    .0945002
          4  |    .041668   .0323537     1.29   0.198     -.021744      .10508
             |
      METRO3 |
          2  |   .0487329   .0222968     2.19   0.029      .005032    .0924337
          3  |   .0081984   .0369695     0.22   0.825    -.0642605    .0806573
          4  |  -.0321326    .035042    -0.92   0.359    -.1008138    .0365485
          5  |   .0570911   .0375362     1.52   0.128    -.0164785    .1306607
          7  |   .0238505   .0416908     0.57   0.567     -.057862    .1055631
             |
       _cons |  -.2221906   .1019532    -2.18   0.029    -.4220152   -.0223659
------------------------------------------------------------------------------

added macro:
               e(year) : "2009"

Iteration 0:   log pseudolikelihood =  -89631681  
Iteration 1:   log pseudolikelihood =  -89631681  

Poisson regression                                      Number of obs = 12,173
                                                        Wald chi2(12) = 119.16
Log pseudolikelihood = -89631681                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0016076   .0187581     0.09   0.932    -.0351576    .0383729
        zinc |   .0830596   .0089777     9.25   0.000     .0654636    .1006557
         per |   .0241654   .0080438     3.00   0.003     .0083999    .0399309
      zadult |  -.0348967   .0153067    -2.28   0.023    -.0648973   -.0048962
             |
      region |
          2  |  -.0439979   .0329358    -1.34   0.182    -.1085509    .0205552
          3  |  -.0301328    .031009    -0.97   0.331    -.0909093    .0306437
          4  |  -.0516753   .0309249    -1.67   0.095     -.112287    .0089364
             |
      METRO3 |
          2  |   -.006255   .0241783    -0.26   0.796    -.0536437    .0411337
          3  |   .0065295   .0421574     0.15   0.877    -.0760975    .0891565
          4  |   .0096658   .0369861     0.26   0.794    -.0628255    .0821572
          5  |   .0479792   .0406773     1.18   0.238    -.0317468    .1277052
          7  |   .0400286   .0185479     2.16   0.031     .0036754    .0763818
             |
       _cons |   2.274531   .0989693    22.98   0.000     2.080555    2.468508
------------------------------------------------------------------------------

added macro:
               e(year) : "2011"

Iteration 0:   log pseudolikelihood =  -19370228  
Iteration 1:   log pseudolikelihood =  -19370228  

Poisson regression                                      Number of obs = 12,173
                                                        Wald chi2(12) = 108.31
Log pseudolikelihood = -19370228                        Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0153038   .0193095     0.79   0.428    -.0225422    .0531497
        zinc |   .0847315   .0093314     9.08   0.000     .0664422    .1030207
         per |   .0238465   .0082367     2.90   0.004     .0077029      .03999
      zadult |   -.035353    .015628    -2.26   0.024    -.0659834   -.0047227
             |
      region |
          2  |  -.0316563   .0342215    -0.93   0.355    -.0987292    .0354165
          3  |   -.037618   .0325124    -1.16   0.247    -.1013411    .0261051
          4  |  -.0467531   .0323688    -1.44   0.149    -.1101947    .0166886
             |
      METRO3 |
          2  |    .003123   .0250246     0.12   0.901    -.0459243    .0521703
          3  |   .0298437   .0425695     0.70   0.483     -.053591    .1132785
          4  |   .0027885   .0383532     0.07   0.942    -.0723824    .0779595
          5  |   .0674531   .0400315     1.68   0.092    -.0110073    .1459135
          7  |   .0348307   .0191372     1.82   0.069    -.0026775    .0723388
             |
       _cons |   -.253433   .1030122    -2.46   0.014    -.4553332   -.0515329
------------------------------------------------------------------------------

added macro:
               e(year) : "2011"

. 
. postclose `topost' 

. 
.  
. eststo monthall : poisson duration summer `col5controls' i.intyr [pw=weight] , r 

Iteration 0:   log pseudolikelihood = -8.002e+08  
Iteration 1:   log pseudolikelihood = -8.002e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 844.69
Log pseudolikelihood = -8.002e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0062441   .0069291     0.90   0.368    -.0073366    .0198248
        zinc |   .0842374   .0039702    21.22   0.000     .0764558    .0920189
         per |   .0391074   .0029663    13.18   0.000     .0332936    .0449211
      zadult |  -.0740064   .0061084   -12.12   0.000    -.0859787    -.062034
             |
      region |
          2  |  -.0334568   .0118139    -2.83   0.005    -.0566116   -.0103021
          3  |  -.0388278    .011016    -3.52   0.000    -.0604188   -.0172368
          4  |  -.0440185   .0115125    -3.82   0.000    -.0665826   -.0214544
             |
      METRO3 |
          2  |   .0314608   .0082804     3.80   0.000     .0152314    .0476901
          3  |    .042465   .0133795     3.17   0.002     .0162418    .0686883
          4  |  -.0408643   .0137465    -2.97   0.003    -.0678069   -.0139216
          5  |   .0277482   .0143311     1.94   0.053    -.0003403    .0558368
          7  |   .0435006   .0100055     4.35   0.000     .0238902     .063111
             |
       intyr |
       2001  |  -.0040831   .0132595    -0.31   0.758    -.0300713     .021905
       2002  |  -.0275198   .0141036    -1.95   0.051    -.0551624    .0001227
       2003  |  -.0009179     .01309    -0.07   0.944    -.0265739     .024738
       2004  |   .0196516   .0144496     1.36   0.174    -.0086691    .0479723
       2005  |   .0183551   .0130639     1.41   0.160    -.0072496    .0439599
       2007  |  -.0488582   .0133094    -3.67   0.000     -.074944   -.0227723
       2009  |  -.0285906   .0132179    -2.16   0.031    -.0544972   -.0026839
       2011  |  -.0048282   .0134577    -0.36   0.720    -.0312049    .0215485
             |
       _cons |   2.287313   .0426732    53.60   0.000     2.203675    2.370951
------------------------------------------------------------------------------

. estadd local year all

added macro:
               e(year) : "all"

.   
. eststo yearall : poisson duration2 summer `col5controls' i.intyr [pw=weight],r

Iteration 0:   log pseudolikelihood = -1.691e+08  
Iteration 1:   log pseudolikelihood = -1.691e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 802.42
Log pseudolikelihood = -1.691e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   duration2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0238404   .0070559     3.38   0.001     .0100111    .0376698
        zinc |   .0813949   .0039694    20.51   0.000      .073615    .0891748
         per |   .0390413   .0030292    12.89   0.000     .0331042    .0449784
      zadult |  -.0755261    .006206   -12.17   0.000    -.0876896   -.0633627
             |
      region |
          2  |  -.0305091   .0120331    -2.54   0.011    -.0540934   -.0069247
          3  |  -.0381532   .0112435    -3.39   0.001    -.0601901   -.0161163
          4  |  -.0423727   .0117948    -3.59   0.000    -.0654901   -.0192553
             |
      METRO3 |
          2  |   .0336119    .008412     4.00   0.000     .0171247     .050099
          3  |   .0522808   .0135075     3.87   0.000     .0258065    .0787551
          4  |  -.0377062   .0140226    -2.69   0.007    -.0651898   -.0102225
          5  |   .0247505   .0147462     1.68   0.093    -.0041515    .0536526
          7  |   .0384822   .0102047     3.77   0.000     .0184814     .058483
             |
       intyr |
       2001  |   .0060768   .0137006     0.44   0.657    -.0207759    .0329295
       2002  |  -.0056933   .0145162    -0.39   0.695    -.0341446    .0227579
       2003  |   .0218748   .0134381     1.63   0.104    -.0044635     .048213
       2004  |   .0414494   .0148262     2.80   0.005     .0123905    .0705082
       2005  |   .0388508   .0133272     2.92   0.004     .0127299    .0649717
       2007  |  -.0259416   .0136877    -1.90   0.058     -.052769    .0008858
       2009  |  -.0099478   .0135942    -0.73   0.464    -.0365919    .0166964
       2011  |   .0056394   .0139244     0.41   0.685     -.021652    .0329308
             |
       _cons |  -.2016047   .0427606    -4.71   0.000     -.285414   -.1177954
------------------------------------------------------------------------------

. estadd local year all

added macro:
               e(year) : "all"

.  
.  
. local esttaboptions = "`esttaboptions'" + " replace"

.  
. esttab month* using monthAHS.tex, ///
>    `esttaboptions' keep(summer zinc per zadult ) nomti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Year dummies= *.intyr") scalars("year Survey Year" N ) 
(output written to monthAHS.tex)

.    
. esttab year* using yearAHS.tex, /// 
>  `esttaboptions' keep(summer zinc per zadult ) nomti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Year dummies= *.intyr") scalars("year Survey Year" N ) 
(output written to yearAHS.tex)

. 
. 
. restore

. 
. if `shorten' == 1 {
.         di "**********************************************"
**********************************************
.         di "SKIPPING OVER SOME GRAPHS AND REGRESSIONS HERE"
SKIPPING OVER SOME GRAPHS AND REGRESSIONS HERE
.         di "**********************************************"
**********************************************
. }

. else {
.         
. 
. 
. 
. 
. 
. ********************************************************************************
. **  REPAIRS AND ADDITIONS
. ********************************************************************************
. 
. *keep if recentmove == 1
. 
. * column 5 controls:
. local builtcontrols = "zinc per zadult i.region built "
. 
. * estimates clear 
. 
. preserve
. keep if recentmove == 1
. 
. eststo rone:  poisson ran nsummer i.region i.intyr  if tenure==1 [pweight=weight] ,r
. eststo rtwo:  poisson ran nsummer built i.region  i.intyr   if tenure==1 [pweight=weight] ,r
. eststo rthree:  poisson ran nsummer built i.region  i.intyr  zinc  if tenure==1 [pweight=weight] ,r
. eststo rfour: poisson ran  nsummer built i.region  i.intyr  zinc per   if tenure==1 [pweight=weight] ,r
. eststo rfive: poisson ran  nsummer built i.region  i.intyr zinc  per zadult  if tenure==1 [pweight=weight] ,r
. eststo rsix: poisson ran  nsummer built i.region  i.intyr zinc per  zadult school     if tenure==1 [pweight=w
> eight] ,r
. eststo rseven:  poisson ran  nsummer built i.region  i.intyr zinc per  zadult school i.METRO3     if tenure==
> 1 [pweight=weight] ,r
. eststo reight: poisson ran  nsummer built i.region   i.intyr  zinc per  zadult school i.METRO3  i.degree   if
>  tenure==1 [pweight=weight] ,r
. eststo rnine: poisson ran  nsummer built i.region   i.intyr  zinc per  zadult school i.METRO3  i.degree i.cms
> a  if tenure==1 [pweight=weight] ,r
. 
. esttab rone rtwo rthree rfour rfive rsix rseven reight rnine using ranAHSspecpres.tex, ///
>    `esttaboptions' keep(nsummer built zinc per zadult school) order(nsummer built zinc per zadult school) nom
> ti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Degree Days = *.degree" "CMSA fixed effects = *.cmsa"  ///
>    "Year dummies= *.intyr") scalars( N ) 
. 
. esttab rsix rseven reight rnine using ranAHSspecpresRef3.tex, ///
>    `esttaboptions' keep(nsummer built zinc per zadult school) order(nsummer built zinc per zadult school) nom
> ti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Degree Days = *.degree" "CMSA fixed effects = *.cmsa"  ///
>    "Year dummies= *.intyr") scalars( N )  
.    
.    
.    
.    
. tempname topost
. postfile `topost' intyr summer_b summer_se str12 depvar using "ran_regs.dta", replace
. 
. foreach yr in `intyr_levels' {
  2.   eststo ran`yr' : poisson ran nsummer `builtcontrols' if intyr == `yr' & tenure == 1 [pw=weight] , r 
  3.   estadd local year `yr' 
  4.   post `topost' (`yr') (_b[nsummer]) (_se[nsummer]) (e(depvar))
  5. }
. 
. postclose `topost'    
. 
. eststo ranall : poisson ran nsummer `builtcontrols' i.intyr   [pw=weight], r
. estadd local year "all" 
. 
. * Regression Table for Appendix
. * (Year-by-year) 
. 
. esttab ran* using ranAHS.tex,  ///
>    `esttaboptions' keep(nsummer built zinc per zadult ) nomti ///
>    indicate("Region fixed effects =  *.region"  ///
>    "Year dummies= *.intyr") scalars("year Survey Year" N )
.  
. ********************************************************************************
. **  COST OF REPAIRS AND ADDITIONS
. ********************************************************************************
. 
. eststo cone:  reg lcost nsummer i.region i.intyr  if tenure==1 [pweight=weight] ,r
. eststo ctwo:  reg lcost nsummer built i.region    i.intyr    if tenure==1 [pweight=weight] ,r
. eststo cthree:  reg lcost nsummer built i.region  i.intyr  zinc  if tenure==1 [pweight=weight] ,r
. eststo cfour: reg lcost  nsummer built i.region   i.intyr  zinc per   if tenure==1 [pweight=weight] ,r
. eststo cfive: reg lcost  nsummer built i.region   i.intyr  zinc per zadult  if tenure==1 [ pweight=weight] ,r
. eststo csix: reg lcost  nsummer built i.region    i.intyr  zinc per zadult school    if tenure==1  [pweight=w
> eight] ,r
. eststo cseven:  reg lcost  nsummer built i.region i.intyr  zinc per zadult school i.METRO3    if tenure==1  [
> pweight=weight] ,r
. eststo ceight: reg lcost  nsummer built i.region  i.intyr  zinc per zadult school i.METRO3  i.degree   if ten
> ure==1 [pweight=weight] ,r
. eststo cnine: reg lcost  nsummer built i.region   i.intyr  zinc per zadult school i.METRO3  i.degree  i.cmsa 
>  if tenure==1 [pweight=weight] ,r 
.       
. esttab cone ctwo cthree cfour cfive csix cseven ceight cnine using lcostAHSspecpres.tex, ///
>    `esttaboptions' keep(nsummer built zinc per zadult school) order(nsummer built zinc per zadult school)  no
> mti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Degree Days = *.degree" "CMSA fixed effects = *.cmsa"  ///
>    "Year dummies= *.intyr") scalars("year Survey Year" N ) 
.    
. esttab csix cseven ceight cnine using lcostAHSspecpresRef3.tex, ///
>    `esttaboptions' keep(nsummer built zinc per zadult school) order(nsummer built zinc per zadult school)  no
> mti ///
>    indicate("Region fixed effects =  *.region" "Urban status fixed effects = *.METRO3" ///
>    "Degree Days = *.degree" "CMSA fixed effects = *.cmsa"  ///
>    "Year dummies= *.intyr") scalars( N )   
.    
. tempname topost
. postfile `topost' intyr summer_b summer_se str12 depvar using "lcost_regs.dta", replace
. 
. foreach yr in `intyr_levels' {
  2.   eststo lcost`yr' : reg lcost nsummer `builtcontrols' if intyr == `yr' & tenure == 1 [pw=weight] , r 
  3.   estadd local year `yr' 
  4.   post `topost' (`yr') (_b[nsummer]) (_se[nsummer]) (e(depvar))
  5. }
. postclose `topost'      
.  
. eststo lcostall : reg lcost nsummer `builtcontrols' i.intyr if tenure == 1 [pw=weight], r
. estadd local year "all"  
. 
. * Regression Table for Appendix
. * (Year-by-year) 
. 
. esttab lcost* using lcostAHS.tex,  ///
>    `esttaboptions' keep(nsummer built zinc per zadult ) nomti ///
>    indicate("Region fixed effects =  *.region"  ///
>    "Year dummies= *.intyr") scalars("year Survey Year" N )
. 
. restore 
.  
.  
. ********************************************************************************
. * Plot confidence intervals for estimates by year                              *
. *   ... key figures for paper                                                  *
. ********************************************************************************
. 
. 
. preserve
. 
.  
. clear
. local durationcolor = "blue"
. local duration2color  = "black"
. 
. 
. * gray-scale figures
. local 1999color gs8
. local 2001color gs0
. 
. foreach outcome in  duration ran lcost {
  2.         use "`outcome'_regs", clear
  3.         cap drop if depvar == "duration"  // removes duration in months outcome
  4.         
.         gen upper = summer_b + 1.96*summer_se
  5.         gen lower = summer_b - 1.96*summer_se 
  6. 
. 
.         tw rcap upper lower intyr if intyr <= 1999 , lcolor(`1999color')  xlab(1999(2)2011) ||  ///
>         rcap upper lower intyr if intyr > 1999 ,  lcolor(`2001color')  xlab(1999(2)2011) ||  ///
>         scatter summer_b intyr if intyr <= 1999 , mcolor(`1999color') mfcolor(`1999color') mstyle(ci) || ///
>         scatter summer_b intyr if intyr>1999  , mcolor(`2001color' ) mfcolor(`2001color') mstyle(ci) legend(o
> ff) ///
>         xti("Survey Year") yline(0)
  7.   
. graph export plot`outcome'wave.pdf, as(pdf) replace
  8.   
. }
.         
. * color figures 
. local 1999color red
. local 2001color black
. 
. foreach outcome in  duration ran lcost {
  2.         use "`outcome'_regs", clear
  3.         cap drop if depvar == "duration"  // removes duration in months outcome
  4.         
.         gen upper = summer_b + 1.96*summer_se
  5.         gen lower = summer_b - 1.96*summer_se 
  6. 
. 
.         tw rcap upper lower intyr if intyr <= 1999 , lcolor(`1999color')  xlab(1999(2)2011) ||  ///
>         rcap upper lower intyr if intyr > 1999 ,  lcolor(`2001color')  xlab(1999(2)2011) ||  ///
>         scatter summer_b intyr if intyr <= 1999 , mcolor(`1999color') mfcolor(`1999color') mstyle(ci) || ///
>         scatter summer_b intyr if intyr>1999  , mcolor(`2001color' ) mfcolor(`2001color') mstyle(ci) legend(o
> ff) ///
>         xti("Survey Year") yline(0)
  7.   
. graph export plot`outcome'wavecolor.pdf, as(pdf) replace
  8.   
. }
. 
. //
. // replace intyr = intyr + .2*(depvar=="duration") - .1  // for plotting both outcomes on the same graph
. //
. // tw rcap upper lower intyr if depvar == "duration2" & intyr <= 1999, lcolor(red) , xlab(1999(2)2011) || ///
. //        rcap upper lower intyr if depvar=="duration2" & intyr > 1999 , lcolor(`duration2color') || ///
. //        rcap upper lower intyr if depvar == "duration", lcolor(`durationcolor')  ||  ///
. //        scatter summer_b  intyr if depvar=="duration2" & intyr<= 1999 , mcolor(red) mfcolor(red) mstyle(ci)
>  || ///      
. //        scatter summer_b  intyr if depvar=="duration2" & intyr > 1999, mcolor(`duration2color') mfcolor(`du
> ration2color') mstyle(ci) || ///
. //        scatter summer_b  intyr if depvar=="duration", mcolor(`durationcolor') mfcolor(`durationcolor') mst
> yle(p2) legend(off) ///
. //        yline(0, lstyle(solid) lcolor(gray)) xti("Survey Year") 
. // graph export plotbothwave.pdf, as(pdf) replace
. 
. 
. restore
. 
. 
. }  

. // end if/else for skipping over some regressions
. 
. ********************************************
. 
. local controls = "`controls' i.intyr"

. 
. * Regressions with Original Data
. eststo durationm : poisson duration summer `col5controls' i.intyr [pw=weight], r

Iteration 0:   log pseudolikelihood = -8.002e+08  
Iteration 1:   log pseudolikelihood = -8.002e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 844.69
Log pseudolikelihood = -8.002e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0062441   .0069291     0.90   0.368    -.0073366    .0198248
        zinc |   .0842374   .0039702    21.22   0.000     .0764558    .0920189
         per |   .0391074   .0029663    13.18   0.000     .0332936    .0449211
      zadult |  -.0740064   .0061084   -12.12   0.000    -.0859787    -.062034
             |
      region |
          2  |  -.0334568   .0118139    -2.83   0.005    -.0566116   -.0103021
          3  |  -.0388278    .011016    -3.52   0.000    -.0604188   -.0172368
          4  |  -.0440185   .0115125    -3.82   0.000    -.0665826   -.0214544
             |
      METRO3 |
          2  |   .0314608   .0082804     3.80   0.000     .0152314    .0476901
          3  |    .042465   .0133795     3.17   0.002     .0162418    .0686883
          4  |  -.0408643   .0137465    -2.97   0.003    -.0678069   -.0139216
          5  |   .0277482   .0143311     1.94   0.053    -.0003403    .0558368
          7  |   .0435006   .0100055     4.35   0.000     .0238902     .063111
             |
       intyr |
       2001  |  -.0040831   .0132595    -0.31   0.758    -.0300713     .021905
       2002  |  -.0275198   .0141036    -1.95   0.051    -.0551624    .0001227
       2003  |  -.0009179     .01309    -0.07   0.944    -.0265739     .024738
       2004  |   .0196516   .0144496     1.36   0.174    -.0086691    .0479723
       2005  |   .0183551   .0130639     1.41   0.160    -.0072496    .0439599
       2007  |  -.0488582   .0133094    -3.67   0.000     -.074944   -.0227723
       2009  |  -.0285906   .0132179    -2.16   0.031    -.0544972   -.0026839
       2011  |  -.0048282   .0134577    -0.36   0.720    -.0312049    .0215485
             |
       _cons |   2.287313   .0426732    53.60   0.000     2.203675    2.370951
------------------------------------------------------------------------------

. estadd local method = "None"

added macro:
             e(method) : "None"

. eststo durationy : poisson durationy summer `col5controls' i.intyr [pw=weight], r

Iteration 0:   log pseudolikelihood = -1.691e+08  
Iteration 1:   log pseudolikelihood = -1.691e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 802.42
Log pseudolikelihood = -1.691e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   durationy | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0238404   .0070559     3.38   0.001     .0100111    .0376698
        zinc |   .0813949   .0039694    20.51   0.000      .073615    .0891748
         per |   .0390413   .0030292    12.89   0.000     .0331042    .0449784
      zadult |  -.0755261    .006206   -12.17   0.000    -.0876896   -.0633627
             |
      region |
          2  |  -.0305091   .0120331    -2.54   0.011    -.0540934   -.0069247
          3  |  -.0381532   .0112435    -3.39   0.001    -.0601901   -.0161163
          4  |  -.0423727   .0117948    -3.59   0.000    -.0654901   -.0192553
             |
      METRO3 |
          2  |   .0336119    .008412     4.00   0.000     .0171247     .050099
          3  |   .0522808   .0135075     3.87   0.000     .0258065    .0787551
          4  |  -.0377062   .0140226    -2.69   0.007    -.0651898   -.0102225
          5  |   .0247505   .0147462     1.68   0.093    -.0041515    .0536526
          7  |   .0384822   .0102047     3.77   0.000     .0184814     .058483
             |
       intyr |
       2001  |   .0060768   .0137006     0.44   0.657    -.0207759    .0329295
       2002  |  -.0056933   .0145162    -0.39   0.695    -.0341446    .0227579
       2003  |   .0218748   .0134381     1.63   0.104    -.0044635     .048213
       2004  |   .0414494   .0148262     2.80   0.005     .0123905    .0705082
       2005  |   .0388508   .0133272     2.92   0.004     .0127299    .0649717
       2007  |  -.0259416   .0136877    -1.90   0.058     -.052769    .0008858
       2009  |  -.0099478   .0135942    -0.73   0.464    -.0365919    .0166964
       2011  |   .0056394   .0139244     0.41   0.685     -.021652    .0329308
             |
       _cons |  -.2016047   .0427606    -4.71   0.000     -.285414   -.1177954
------------------------------------------------------------------------------

. estadd local method = "None"

added macro:
             e(method) : "None"

. 
. gen orig_esample = e(sample)

. 
. eststo sumstats_orig : mean duration durationy [pw=weight] 

Mean estimation                         Number of obs = 64,841

--------------------------------------------------------------
             |       Mean   Std. err.     [95% conf. interval]
-------------+------------------------------------------------
    duration |    22.2621   .0765356      22.11209    22.41211
   durationy |   1.840166   .0064328      1.827558    1.852775
--------------------------------------------------------------

. 
. * Listwise Deletion (January Data):
. eststo durationmlist : poisson duration summer  `col5controls' i.intyr if pmovm != 1 [pw=weight] , r

Iteration 0:   log pseudolikelihood = -7.096e+08  
Iteration 1:   log pseudolikelihood = -7.096e+08  

Poisson regression                                      Number of obs = 58,264
                                                        Wald chi2(20) = 833.03
Log pseudolikelihood = -7.096e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0463552   .0076063     6.09   0.000     .0314471    .0612633
        zinc |   .0850054   .0040058    21.22   0.000     .0771542    .0928565
         per |   .0393123   .0031653    12.42   0.000     .0331084    .0455161
      zadult |  -.0756318   .0064836   -11.67   0.000    -.0883394   -.0629242
             |
      region |
          2  |  -.0285224   .0124304    -2.29   0.022    -.0528855   -.0041593
          3  |  -.0355869   .0116424    -3.06   0.002    -.0584055   -.0127683
          4  |   -.042651   .0121603    -3.51   0.000    -.0664848   -.0188171
             |
      METRO3 |
          2  |   .0344964   .0087751     3.93   0.000     .0172975    .0516954
          3  |   .0414603   .0140963     2.94   0.003     .0138321    .0690886
          4  |  -.0395842   .0145304    -2.72   0.006    -.0680633   -.0111052
          5  |   .0290444    .015082     1.93   0.054    -.0005159    .0586046
          7  |   .0479192   .0105202     4.55   0.000        .0273    .0685384
             |
       intyr |
       2001  |   .0047242   .0140535     0.34   0.737    -.0228201    .0322684
       2002  |  -.0287832     .01478    -1.95   0.051    -.0577515    .0001851
       2003  |  -.0013006   .0139281    -0.09   0.926    -.0285991    .0259979
       2004  |   .0153392   .0153208     1.00   0.317    -.0146889    .0453674
       2005  |   .0119347   .0138603     0.86   0.389    -.0152309    .0391004
       2007  |  -.0420091   .0140792    -2.98   0.003    -.0696039   -.0144144
       2009  |  -.0161344   .0140284    -1.15   0.250    -.0436297    .0113608
       2011  |   .0080646   .0141911     0.57   0.570    -.0197495    .0358788
             |
       _cons |   2.233166   .0432715    51.61   0.000     2.148356    2.317977
------------------------------------------------------------------------------

. eststo durationylist : poisson durationy summer  `col5controls' i.intyr if pmovm != 1 [pw=weight] , r

Iteration 0:   log pseudolikelihood = -1.510e+08  
Iteration 1:   log pseudolikelihood = -1.510e+08  

Poisson regression                                      Number of obs = 58,264
                                                        Wald chi2(20) = 731.91
Log pseudolikelihood = -1.510e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   durationy | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0014176   .0074812     0.19   0.850    -.0132453    .0160806
        zinc |   .0790166   .0039363    20.07   0.000     .0713015    .0867316
         per |   .0373463   .0031632    11.81   0.000     .0311464    .0435461
      zadult |  -.0733658   .0064316   -11.41   0.000    -.0859716     -.06076
             |
      region |
          2  |  -.0266887   .0124295    -2.15   0.032    -.0510501   -.0023273
          3  |  -.0317697   .0116556    -2.73   0.006    -.0546143   -.0089251
          4  |  -.0385726   .0122349    -3.15   0.002    -.0625526   -.0145925
             |
      METRO3 |
          2  |   .0352824   .0087242     4.04   0.000     .0181833    .0523816
          3  |   .0465441   .0140024     3.32   0.001     .0190999    .0739883
          4  |  -.0358806   .0144748    -2.48   0.013    -.0642506   -.0075106
          5  |   .0238761   .0153996     1.55   0.121    -.0063066    .0540587
          7  |   .0412561   .0105027     3.93   0.000     .0206711     .061841
             |
       intyr |
       2001  |   .0146683   .0142524     1.03   0.303    -.0132659    .0426024
       2002  |   -.009149   .0149622    -0.61   0.541    -.0384743    .0201763
       2003  |   .0213056   .0140552     1.52   0.130     -.006242    .0488532
       2004  |   .0371715    .015442     2.41   0.016     .0069057    .0674374
       2005  |   .0284148   .0139345     2.04   0.041     .0011037     .055726
       2007  |  -.0237253   .0142199    -1.67   0.095    -.0515959    .0041452
       2009  |  -.0018291   .0141748    -0.13   0.897    -.0296113     .025953
       2011  |   .0112109   .0144414     0.78   0.438    -.0170938    .0395156
             |
       _cons |  -.1599611   .0426323    -3.75   0.000    -.2435189   -.0764034
------------------------------------------------------------------------------

. 
. * Reweight January Observations:
. * needs imp_fraction 
. 
. gen reweight = weight - weight * (pmovm ==1) * `imp_fraction'

. eststo durationmre : poisson duration summer `col5controls' i.intyr [pw=reweight] , r

Iteration 0:   log pseudolikelihood = -7.413e+08  
Iteration 1:   log pseudolikelihood = -7.413e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 866.00
Log pseudolikelihood = -7.413e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0295445   .0071454     4.13   0.000     .0155398    .0435493
        zinc |   .0846583   .0038883    21.77   0.000     .0770374    .0922792
         per |   .0391986   .0030483    12.86   0.000     .0332241    .0451731
      zadult |  -.0749499   .0062394   -12.01   0.000     -.087179   -.0627208
             |
      region |
          2  |  -.0304948   .0120374    -2.53   0.011    -.0540876    -.006902
          3  |  -.0366875   .0112409    -3.26   0.001    -.0587193   -.0146558
          4  |  -.0431169   .0117382    -3.67   0.000    -.0661234   -.0201104
             |
      METRO3 |
          2  |    .033288   .0084571     3.94   0.000     .0167124    .0498636
          3  |   .0416303   .0136287     3.05   0.002     .0149186     .068342
          4  |   -.040164   .0140276    -2.86   0.004    -.0676575   -.0126704
          5  |   .0284337   .0145933     1.95   0.051    -.0001687    .0570361
          7  |   .0462201     .01018     4.54   0.000     .0262678    .0661725
             |
       intyr |
       2001  |   .0013542   .0135407     0.10   0.920     -.025185    .0278935
       2002  |  -.0284535   .0142576    -2.00   0.046    -.0563978   -.0005092
       2003  |  -.0010831   .0133792    -0.08   0.935    -.0273057    .0251396
       2004  |   .0169095   .0147495     1.15   0.252     -.011999    .0458179
       2005  |   .0142824   .0133339     1.07   0.284    -.0118516    .0404164
       2007  |  -.0447594    .013581    -3.30   0.001    -.0713776   -.0181412
       2009  |  -.0209491    .013529    -1.55   0.122    -.0474654    .0055672
       2011  |   .0029444   .0137263     0.21   0.830    -.0239586    .0298475
             |
       _cons |   2.255954   .0418729    53.88   0.000     2.173885    2.338024
------------------------------------------------------------------------------

. eststo durationyre : poisson durationy summer `col5controls' i.intyr [pw=reweight] , r

Iteration 0:   log pseudolikelihood = -1.573e+08  
Iteration 1:   log pseudolikelihood = -1.573e+08  

Poisson regression                                      Number of obs = 64,841
                                                        Wald chi2(20) = 786.45
Log pseudolikelihood = -1.573e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   durationy | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0106363   .0071439     1.49   0.137    -.0033655    .0246381
        zinc |   .0799265   .0038585    20.71   0.000      .072364     .087489
         per |   .0379989    .003071    12.37   0.000     .0319798    .0440179
      zadult |  -.0742027   .0062454   -11.88   0.000    -.0864435   -.0619619
             |
      region |
          2  |  -.0280428   .0121241    -2.31   0.021    -.0518057     -.00428
          3  |  -.0342005   .0113422    -3.02   0.003    -.0564308   -.0119702
          4  |   -.040002   .0118992    -3.36   0.001     -.063324   -.0166799
             |
      METRO3 |
          2  |   .0346878   .0084796     4.09   0.000     .0180681    .0513075
          3  |   .0487778   .0136304     3.58   0.000     .0220628    .0754929
          4  |  -.0364991   .0141078    -2.59   0.010    -.0641499   -.0088483
          5  |   .0242731   .0149672     1.62   0.105     -.005062    .0536082
          7  |   .0402471   .0102491     3.93   0.000     .0201591     .060335
             |
       intyr |
       2001  |   .0114987   .0138411     0.83   0.406    -.0156294    .0386268
       2002  |  -.0077876   .0145394    -0.54   0.592    -.0362843    .0207092
       2003  |   .0214948   .0136056     1.58   0.114    -.0051717    .0481612
       2004  |    .038795   .0149841     2.59   0.010     .0094266    .0681634
       2005  |   .0323569   .0134992     2.40   0.017      .005899    .0588149
       2007  |  -.0244595   .0138215    -1.77   0.077    -.0515492    .0026302
       2009  |  -.0047525   .0137685    -0.35   0.730    -.0317383    .0222333
       2011  |   .0093304   .0140643     0.66   0.507    -.0182351    .0368958
             |
       _cons |  -.1766631   .0416557    -4.24   0.000    -.2583067   -.0950194
------------------------------------------------------------------------------

. 
. * Trimming both December and January:
. eststo durationmtrim : poisson duration summer `col5controls' i.intyr if inrange(pmovm,2,11) [pw=weight] , r

Iteration 0:   log pseudolikelihood = -6.650e+08  
Iteration 1:   log pseudolikelihood = -6.650e+08  

Poisson regression                                      Number of obs = 54,606
                                                        Wald chi2(20) = 756.55
Log pseudolikelihood = -6.650e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
    duration | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0135471   .0080328     1.69   0.092    -.0021969    .0292911
        zinc |   .0835267   .0040968    20.39   0.000     .0754972    .0915562
         per |   .0386265   .0032552    11.87   0.000     .0322466    .0450065
      zadult |  -.0762203   .0066459   -11.47   0.000    -.0892459   -.0631946
             |
      region |
          2  |   -.026873   .0127012    -2.12   0.034    -.0517669   -.0019791
          3  |  -.0339134   .0119147    -2.85   0.004    -.0572658   -.0105609
          4  |  -.0431944   .0124586    -3.47   0.001    -.0676128    -.018776
             |
      METRO3 |
          2  |   .0352114   .0089952     3.91   0.000     .0175812    .0528416
          3  |   .0413125   .0145493     2.84   0.005     .0127965    .0698285
          4  |  -.0441011   .0148235    -2.98   0.003    -.0731547   -.0150475
          5  |   .0327042   .0154928     2.11   0.035     .0023389    .0630694
          7  |   .0489069   .0107868     4.53   0.000     .0277652    .0700486
             |
       intyr |
       2001  |   .0040713   .0144121     0.28   0.778    -.0241759    .0323185
       2002  |  -.0298205   .0151749    -1.97   0.049    -.0595627   -.0000782
       2003  |  -.0020836   .0142984    -0.15   0.884    -.0301079    .0259407
       2004  |   .0121198   .0156842     0.77   0.440    -.0186207    .0428602
       2005  |   .0111589   .0142168     0.78   0.433    -.0167056    .0390234
       2007  |  -.0443013   .0144087    -3.07   0.002    -.0725418   -.0160608
       2009  |  -.0157275   .0143529    -1.10   0.273    -.0438587    .0124037
       2011  |    .005494   .0145049     0.38   0.705     -.022935    .0339231
             |
       _cons |   2.284017   .0443647    51.48   0.000     2.197064    2.370971
------------------------------------------------------------------------------

. eststo durationytrim : poisson durationy summer `col5controls' i.intyr if inrange(pmovm,2,11) [pw=weight] , r

Iteration 0:   log pseudolikelihood = -1.419e+08  
Iteration 1:   log pseudolikelihood = -1.419e+08  

Poisson regression                                      Number of obs = 54,606
                                                        Wald chi2(20) = 692.10
Log pseudolikelihood = -1.419e+08                       Prob > chi2   = 0.0000

------------------------------------------------------------------------------
             |               Robust
   durationy | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0097618   .0081164     1.20   0.229    -.0061461    .0256697
        zinc |   .0796873   .0040954    19.46   0.000     .0716606    .0877141
         per |   .0371834   .0033085    11.24   0.000     .0306989     .043668
      zadult |  -.0757873   .0066967   -11.32   0.000    -.0889126   -.0626619
             |
      region |
          2  |  -.0262983   .0128809    -2.04   0.041    -.0515444   -.0010522
          3  |  -.0332877   .0120979    -2.75   0.006    -.0569991   -.0095762
          4  |  -.0411558   .0127179    -3.24   0.001    -.0660823   -.0162292
             |
      METRO3 |
          2  |   .0371362   .0090786     4.09   0.000     .0193425      .05493
          3  |   .0476778   .0146901     3.25   0.001     .0188856    .0764699
          4  |  -.0392654   .0149997    -2.62   0.009    -.0686642   -.0098666
          5  |   .0282716   .0160644     1.76   0.078    -.0032141    .0597572
          7  |   .0419967   .0109435     3.84   0.000     .0205478    .0634456
             |
       intyr |
       2001  |   .0138752   .0148458     0.93   0.350     -.015222    .0429724
       2002  |  -.0097961   .0156148    -0.63   0.530    -.0404007    .0208084
       2003  |   .0187184   .0146633     1.28   0.202    -.0100211    .0474579
       2004  |   .0353362   .0160529     2.20   0.028     .0038731    .0667992
       2005  |    .028348   .0145187     1.95   0.051    -.0001083    .0568042
       2007  |  -.0260507    .014774    -1.76   0.078    -.0550072    .0029059
       2009  |  -.0008693   .0147283    -0.06   0.953    -.0297363    .0279977
       2011  |   .0111427   .0149729     0.74   0.457    -.0182037    .0404891
             |
       _cons |  -.1695507   .0444975    -3.81   0.000    -.2567642   -.0823372
------------------------------------------------------------------------------

. 
. esttab durationm durationmlist durationmre durationmtrim using "$parent/results/durationm.tex", se compress  
> keep(summer) nodepvar mti("Original" "Listwise" "Reweighted" "Trimmed") replace eqlabels("Duration (Months)")
>  label nodepvar  nolines noobs num   nonotes nostar    posthead(\hline) prefoot(\hline) fragment
(output written to G:\My Drive\research\HotColdReplication/results/durationm.tex)

. 
. esttab durationy durationylist durationyre durationytrim using "$parent/results/durationy.tex", se compress  
> keep(summer) eqlabels("Duration (Years)") nodepvar nomti nonum  label nostar nogaps  replace nolines  nonotes
>  prefoot(\hline) postfoot(\hline\hline) fragment
(output written to G:\My Drive\research\HotColdReplication/results/durationy.tex)

. 
. 
. ******************************************************************************
. * PREP FOR IMPUTATIONS
. ******************************************************************************
. 
. 
. clear

. use `original'

. keep if !mi(ym(pmovyr,pmovm)) 
(429,496 observations deleted)

. egen newid = group(control intyr smsa)

. 
. save `preimputation' , replace
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000c.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000c.tmp saved as .dta format

. 
. ******************************************************************************
. * Create file of PMOVM for sampling from: 
. use `preimputation', clear

. keep pmovm

. rename pmovm pmovm_imp

. gen id = _n

. local Npmovm = _N

. save `pmovm', replace
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format

. 
. ******************************************************************************
. * Create file of DURATIONS for sampling from: 
. clear

. use `preimputation'

. drop if mi(duration)
(444 observations deleted)

. * keep recent moves
. *keep if pmovm != 1  * causes problem for one particular observation!
. keep duration 

. rename duration duration_imp

. * duplicate durations many times for later use of bsample
. expand $M+$M
(1,231,979 observations created)

. save `durations'
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000007.tmp saved as .dta format

. 
. ******************************************************************************
. * IMPUTATIONS
. 
. clear

. use `preimputation'

. 
. drop if mi(duration)
(444 observations deleted)

. 
. * create $M copies of data set
. * generate variable, m, that tracks imputation number; m=0 is original data
. expand $M+1
(648,410 observations created)

. bys newid intyr: gen m = _n-1

. 
. * Imputation Step
. * generate random number to determine whether observation is imputed
. gen imputation_random = runiform()

. 
. * calculate target share of January moves in imp_fraction
. * this may not exactly match February numbers, but should be close
. * See calculation of imp_fraction earlier in do file
. 
. gen impflag = (pmovm==1 & m==0)

. 
. * Min and Max possible duration for each observation
. gen m_d = ym(move,movm) - min(ym(move,movm),ym(pmovyr,12))

. gen M_d = ym(move,movm) - ym(pmovyr,1)

. 
. egen group_duration = group(m_d M_d)

. levelsof group_duration, local(group_levels)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 
> 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 7
> 7 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102

. 
. save `ForImputations', replace
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000008.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000008.tmp saved as .dta format

. 
. matrix check = [0,0,0\0,0,0]

. 
. local imp = 1

. 
. foreach imputation in A B C {
  2.     
.         matrix check[1,`imp'] = runiform()
  3.         
.     include "$parent\programs\Imputation`imputation'.do"
  4.         
.         matrix check[2,`imp'] = runiform()
  5.         
.         include "$parent\programs\AnalyzeMultiplyImputed.do"
  6.         
.         local imp = `imp' + 1
  7. }

. *******************************************************************************
. * A. Impute PMOVM from EMPIRICAL Distribution:
. /*
> Assume that movm, move, pmovyr are correct ...
> ... impute pmovm ...
> ... and reimpute where imputed pmovm places prior move after current move 
> */
. 
. set seed 10

. 
. tempfile imputationA

. 
. use `ForImputations', clear

. 
. gen id = ceil(runiform(0,`Npmovm')) if imputation_random > `imp_fraction'
(465,163 missing values generated)

. merge m:1 id using `pmovm', nogen
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       466,620
        from master                   465,163  
        from using                      1,457  

    Matched                           248,088  
    -----------------------------------------

. replace pmovm = pmovm_imp if pmovm == 1 & m > 0 & imputation_random > `imp_fraction'
(20,681 real changes made)

. count if ym(pmovyr,pmovm) > ym(move,movm)
  2,270

. local reversed = r(N)

. * `reversed' counts observations whose imputed prior move is after the current move
. 
. while `reversed' > 0 {
  2.     drop pmovm_imp
  3.     save `imputationA', replace
  4.         
.         /*
>         shorten up the file from which to draw imputed month
>          ... some imputations give a month that is too high (too late in the year)
>          ... and this causes the imputed prior move to happen after the current move
>          ... we progressively shorten the pmovm file, removing the available
>          ... months to impute from, starting with December and working down
>         */
.         
.         use `pmovm' , clear
  5.         drop id
  6.         quietly summarize pmovm_imp
  7.         drop if pmovm_imp == r(max)
  8.         gen id = _n
  9.         local Npmovm = _N
 10.         save `pmovm', replace
 11.         
.         use `imputationA' , clear
 12.         
.         * new draw from pmovm distribution:
.         replace id = ceil(runiform(0,`Npmovm')) if (ym(pmovyr,pmovm) > ym(move,movm))
 13.         merge m:1 id using `pmovm', nogen
 14.     replace pmovm = pmovm_imp if (ym(pmovyr,pmovm) > ym(move,movm)) & (m > 0) & (imputation_random > `imp_
> fraction')
 15.     count if ym(pmovyr,pmovm) > ym(move,movm)
 16.     local reversed = r(N)
 17.         di `reversed'
 18. }
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(3,684 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(2,270 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       479,299
        from master                   479,258  
        from using                         41  

    Matched                           235,450  
    -----------------------------------------
(2,090 real changes made)
  1,345
1345
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(3,920 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(1,345 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       494,120
        from master                   494,119  
        from using                          1  

    Matched                           220,630  
    -----------------------------------------
(1,213 real changes made)
  885
885
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(4,617 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(885 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       511,854
        from master                   511,854  
        from using                          0  

    Matched                           202,896  
    -----------------------------------------
(794 real changes made)
  664
664
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(5,104 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(664 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       531,072
        from master                   531,072  
        from using                          0  

    Matched                           183,678  
    -----------------------------------------
(589 real changes made)
  503
503
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(7,639 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(503 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       560,191
        from master                   560,191  
        from using                          0  

    Matched                           154,559  
    -----------------------------------------
(446 real changes made)
  387
387
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(5,840 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(387 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       582,390
        from master                   582,390  
        from using                          0  

    Matched                           132,360  
    -----------------------------------------
(323 real changes made)
  290
290
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(7,634 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(290 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       611,605
        from master                   611,605  
        from using                          0  

    Matched                           103,145  
    -----------------------------------------
(244 real changes made)
  189
189
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(6,437 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(189 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       636,231
        from master                   636,231  
        from using                          0  

    Matched                            78,519  
    -----------------------------------------
(166 real changes made)
  116
116
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(4,772 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(116 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       654,740
        from master                   654,740  
        from using                          0  

    Matched                            60,010  
    -----------------------------------------
(94 real changes made)
  60
60
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(4,513 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(60 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       671,989
        from master                   671,989  
        from using                          0  

    Matched                            42,761  
    -----------------------------------------
(51 real changes made)
  19
19
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_00000g.tmp saved as .dta format
(4,500 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000004.tmp saved as .dta format
(19 real changes made)
(label month_lbl already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       689,181
        from master                   689,181  
        from using                          0  

    Matched                            25,569  
    -----------------------------------------
(19 real changes made)
  0
0

. 
. drop id pmovm_imp 

. drop if mi(newid)
(1,499 observations deleted)

. 
. * end of imputation step (A)
. *******************************************************************************
. 
. ******************************************************************************
. * ANALYSIS, REGARDLESS OF WHICH IMPUTATION APPROACH
. 
. cap drop movedate pmovedate duration durationy summer

. 
. cap gen impflag = (pmovm==1 & m==0)

. 
. gen movedate = ym(move,movm)

. gen pmovedate = ym(pmovyr,pmovm)

. gen duration = movedate - pmovedate

.  
. gen durationy = move-pmovyr

. 
. gen summer = inrange(pmovm ,4, 9) if !mi(pmovm)

. label var summer "Summer"

. 
. graph box duration, over(pmovm) noout

. 
. if "`imputation'"=="A" {
. local titletext = "Prior Move Month Imputed from Empirical Distribution"
. }

. if "`imputation'"=="B" {
. local titletext = "Prior Move Month Imputed from Uniform Distribution"
. }

. if "`imputation'"=="C" {
. local titletext = "Duration Imputed from Empirical Distribution"
. }

. 
. 
. preserve

. collapse (mean) duration durationy , by(pmovm m)

. tw scatter duration pmovm if m == 0, mcolor(blue) msymbol(square_hollow)  msize(large) ysc(log) ///
>   || scatter durationy pmovm if m == 0, mcolor(red)  msymbol(circle_hollow) msize(large) yaxis(2)  ysc(log)  
> ///
>   || scatter duration pmovm if m > 0 , mcolor(blue) msymbol(smsquare) msize(small)  ///
>   || scatter durationy pmovm if m >0 ,  mcolor(red) msymbol(smcircle) msize(small) yaxis(2) ///
>   yti("Duration (months)", color(blue)) ///
>   yti("Duration (years)", axis(2) color(red)) ///
>   ti(`titletext') ///
>   legend(off) ysc(axis(1) lcolor(blue)) ysc(axis(2) lcolor(red)) ///
>   ylab( , labcolor(blue) tlcolor(blue)) ///
>   ylab( , axis(2) labcolor(red) tlcolor(red)) ///
>   xlab( $months ) xti("Prior Move Month") saving(imputed`imputation', replace) 
file imputedA.gph saved

. graph export pmovmscatter_imputed`imputation'.pdf, as(pdf) replace
file pmovmscatter_imputedA.pdf saved as PDF format

. 
. restore

. 
. ******************************************************************************
. *  DURATION OF OCCUPANCY
. ******************************************************************************
. 
. * basic regression
. 
. save `imputed' , replace
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000003.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000003.tmp saved as .dta format

. 
. ********************************************************************************
. 
. replace pmovm = . if impflag==1   /* listwise deletion */
(6,577 real changes made, 6,577 to missing)

. replace duration = . if impflag==1 
(6,577 real changes made, 6,577 to missing)

. replace summer = . if impflag == 1
(6,577 real changes made, 6,577 to missing)

. 
. save `mi', replace
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000009.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000009.tmp saved as .dta format

. 
. * Declaration of mi dataset
. mi import flong , m(m) id(newid) imputed(duration pmovm summer )
(6577 m=0 obs now marked as incomplete)

. 
. save "$parent/data/miAHSForAnalysis.dta", replace
file G:\My Drive\research\HotColdReplication/data/miAHSForAnalysis.dta saved

. 
. eststo sumstats`imputation' : mi estimate , post saving(sumstatsmi, replace) : mean duration durationy [pw=we
> ight]

Multiple-imputation estimates     Imputations     =         10
Mean estimation                   Number of obs   =     64,841
                                  Average RVI     =     0.0217
                                  Largest FMI     =     0.0033
                                  Complete DF     =      64840
DF adjustment:   Small sample     DF:     min     =  59,917.34
                                          avg     =  62,377.67
Within VCE type:       Robust             max     =  64,838.00

--------------------------------------------------------------
             |       Mean   Std. err.     [95% conf. interval]
-------------+------------------------------------------------
    duration |   22.09358   .0765325      21.94358    22.24359
   durationy |   1.840166   .0064328      1.827558    1.852775
--------------------------------------------------------------

. 
. * use column (5) controls
. 
. eststo durationmmi`imputation' : mi estimate, post saving(durationmmi, replace) : poisson duration summer `co
> l5controls' i.intyr [pw=weight] 

Multiple-imputation estimates                   Imputations       =         10
Poisson regression                              Number of obs     =     64,841
                                                Average RVI       =     0.0067
                                                Largest FMI       =     0.0457
DF adjustment:   Large sample                   DF:     min       =   4,384.39
                                                        avg       = 875,909.89
                                                        max       = 6097169.59
Model F test:       Equal FMI                   F(  20, 3.8e+06)  =      42.12
Within VCE type:       Robust                   Prob > F          =     0.0000

------------------------------------------------------------------------------
    duration | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0200015   .0072062     2.78   0.006     .0058737    .0341293
        zinc |    .084926    .004005    21.20   0.000     .0770762    .0927758
         per |   .0394915   .0029925    13.20   0.000     .0336263    .0453567
      zadult |  -.0745635   .0061623   -12.10   0.000    -.0866415   -.0624856
             |
      region |
          2  |  -.0326491   .0119068    -2.74   0.006     -.055986   -.0093122
          3  |  -.0400552    .011101    -3.61   0.000    -.0618129   -.0182975
          4  |  -.0445586   .0116047    -3.84   0.000    -.0673034   -.0218138
             |
      METRO3 |
          2  |   .0314945   .0083533     3.77   0.000     .0151222    .0478667
          3  |    .043534   .0134656     3.23   0.001     .0171418    .0699262
          4  |  -.0403964   .0138558    -2.92   0.004    -.0675534   -.0132394
          5  |   .0279829   .0144244     1.94   0.052    -.0002885    .0562543
          7  |   .0440237   .0100993     4.36   0.000     .0242295     .063818
             |
       intyr |
       2001  |  -.0036299   .0133678    -0.27   0.786    -.0298304    .0225707
       2002  |  -.0273395   .0142374    -1.92   0.055    -.0552445    .0005654
       2003  |  -.0013804   .0131639    -0.10   0.916    -.0271812    .0244203
       2004  |    .019723   .0145438     1.36   0.175    -.0087825    .0482284
       2005  |   .0192434   .0131606     1.46   0.144     -.006551    .0450377
       2007  |  -.0480406   .0134113    -3.58   0.000    -.0743263    -.021755
       2009  |  -.0280376    .013353    -2.10   0.036    -.0542092   -.0018659
       2011  |  -.0032317   .0135879    -0.24   0.812    -.0298636    .0234003
             |
       _cons |   2.263968   .0430672    52.57   0.000     2.179558    2.348378
------------------------------------------------------------------------------

. estadd local method = "`imputation'"

added macro:
             e(method) : "A"

. eststo durationymi`imputation' : mi estimate , post saving(durationymi, replace) : poisson durationy summer `
> col5controls' i.intyr [pw=weight]  

Multiple-imputation estimates                   Imputations       =         10
Poisson regression                              Number of obs     =     64,841
                                                Average RVI       =     0.0022
                                                Largest FMI       =     0.0437
DF adjustment:   Large sample                   DF:     min       =   4,794.01
                                                        avg       =   2.59e+10
                                                        max       =   1.21e+11
Model F test:       Equal FMI                   F(  20, 3.3e+07)  =      39.95
Within VCE type:       Robust                   Prob > F          =     0.0000

------------------------------------------------------------------------------
   durationy | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0214837   .0072673     2.96   0.003     .0072365    .0357309
        zinc |   .0814092   .0039697    20.51   0.000     .0736286    .0891897
         per |   .0390064   .0030286    12.88   0.000     .0330704    .0449424
      zadult |  -.0754631   .0062056   -12.16   0.000    -.0876259   -.0633002
             |
      region |
          2  |  -.0304264   .0120328    -2.53   0.011    -.0540102   -.0068425
          3  |  -.0382935   .0112418    -3.41   0.001     -.060327     -.01626
          4  |  -.0425211   .0117935    -3.61   0.000     -.065636   -.0194063
             |
      METRO3 |
          2  |   .0335628   .0084121     3.99   0.000     .0170754    .0500503
          3  |   .0522665   .0135063     3.87   0.000     .0257946    .0787384
          4  |  -.0376906   .0140226    -2.69   0.007    -.0651745   -.0102068
          5  |   .0247329   .0147457     1.68   0.093    -.0041681    .0536339
          7  |   .0385064   .0102054     3.77   0.000     .0185041    .0585087
             |
       intyr |
       2001  |   .0061529   .0137026     0.45   0.653    -.0207036    .0330095
       2002  |   -.005671   .0145176    -0.39   0.696    -.0341249     .022783
       2003  |   .0218712   .0134373     1.63   0.104    -.0044654    .0482078
       2004  |   .0414729   .0148271     2.80   0.005     .0124124    .0705334
       2005  |   .0389242    .013327     2.92   0.003     .0128037    .0650446
       2007  |  -.0258363   .0136884    -1.89   0.059    -.0526651    .0009924
       2009  |  -.0098683    .013596    -0.73   0.468    -.0365159    .0167793
       2011  |   .0057974   .0139255     0.42   0.677    -.0214961     .033091
             |
       _cons |  -.2008039   .0427985    -4.69   0.000    -.2846873   -.1169204
------------------------------------------------------------------------------

. estadd local method = "`imputation'"

added macro:
             e(method) : "A"

. 
. 
. 
. *******************************************************************************
. * B. Impute PMOVM from UNIFORM Distribution:
. /*
> Assume that movm, move, pmovyr are correct ...
> ... impute pmovm from uniform distribution ...
> ... and reimpute where imputed pmovm places prior move after current move 
> */
. 
. set seed 12

. 
. use `ForImputations', clear

. 
. replace pmovm = ceil(runiform(0,12))  if pmovm == 1 & m > 0 & imputation_random > `imp_fraction'
(21,145 real changes made)

. count if ym(pmovyr,pmovm) > ym(move,movm)
  2,483

. 
. * reimpute if newly imputed month is too late (which would mean that prior move happens after current move)
. foreach maxmonth of numlist 11/1 {
  2.   replace pmovm = ceil(runiform(0,`maxmonth')) if ym(pmovyr,pmovm) > ym(move,movm) & m > 0 & imputation_ra
> ndom > `imp_fraction'
  3.   count if ym(pmovyr,pmovm) > ym(move,movm)
  4. }
(2,292 real changes made)
  1,463
(1,344 real changes made)
  949
(865 real changes made)
  666
(601 real changes made)
  502
(443 real changes made)
  373
(318 real changes made)
  283
(244 real changes made)
  224
(191 real changes made)
  144
(112 real changes made)
  89
(62 real changes made)
  48
(48 real changes made)
  0

. 
. * end of imputation step (B)
. *******************************************************************************
. 
. ******************************************************************************
. * ANALYSIS, REGARDLESS OF WHICH IMPUTATION APPROACH
. 
. cap drop movedate pmovedate duration durationy summer

. 
. cap gen impflag = (pmovm==1 & m==0)

. 
. gen movedate = ym(move,movm)

. gen pmovedate = ym(pmovyr,pmovm)

. gen duration = movedate - pmovedate

.  
. gen durationy = move-pmovyr

. 
. gen summer = inrange(pmovm ,4, 9) if !mi(pmovm)

. label var summer "Summer"

. 
. graph box duration, over(pmovm) noout

. 
. if "`imputation'"=="A" {
. local titletext = "Prior Move Month Imputed from Empirical Distribution"
. }

. if "`imputation'"=="B" {
. local titletext = "Prior Move Month Imputed from Uniform Distribution"
. }

. if "`imputation'"=="C" {
. local titletext = "Duration Imputed from Empirical Distribution"
. }

. 
. 
. preserve

. collapse (mean) duration durationy , by(pmovm m)

. tw scatter duration pmovm if m == 0, mcolor(blue) msymbol(square_hollow)  msize(large) ysc(log) ///
>   || scatter durationy pmovm if m == 0, mcolor(red)  msymbol(circle_hollow) msize(large) yaxis(2)  ysc(log)  
> ///
>   || scatter duration pmovm if m > 0 , mcolor(blue) msymbol(smsquare) msize(small)  ///
>   || scatter durationy pmovm if m >0 ,  mcolor(red) msymbol(smcircle) msize(small) yaxis(2) ///
>   yti("Duration (months)", color(blue)) ///
>   yti("Duration (years)", axis(2) color(red)) ///
>   ti(`titletext') ///
>   legend(off) ysc(axis(1) lcolor(blue)) ysc(axis(2) lcolor(red)) ///
>   ylab( , labcolor(blue) tlcolor(blue)) ///
>   ylab( , axis(2) labcolor(red) tlcolor(red)) ///
>   xlab( $months ) xti("Prior Move Month") saving(imputed`imputation', replace) 
file imputedB.gph saved

. graph export pmovmscatter_imputed`imputation'.pdf, as(pdf) replace
file pmovmscatter_imputedB.pdf saved as PDF format

. 
. restore

. 
. ******************************************************************************
. *  DURATION OF OCCUPANCY
. ******************************************************************************
. 
. * basic regression
. 
. save `imputed' , replace
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000003.tmp saved as .dta format

. 
. ********************************************************************************
. 
. replace pmovm = . if impflag==1   /* listwise deletion */
(6,577 real changes made, 6,577 to missing)

. replace duration = . if impflag==1 
(6,577 real changes made, 6,577 to missing)

. replace summer = . if impflag == 1
(6,577 real changes made, 6,577 to missing)

. 
. save `mi', replace
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000009.tmp saved as .dta format

. 
. * Declaration of mi dataset
. mi import flong , m(m) id(newid) imputed(duration pmovm summer )
(6577 m=0 obs now marked as incomplete)

. 
. save "$parent/data/miAHSForAnalysis.dta", replace
file G:\My Drive\research\HotColdReplication/data/miAHSForAnalysis.dta saved

. 
. eststo sumstats`imputation' : mi estimate , post saving(sumstatsmi, replace) : mean duration durationy [pw=we
> ight]

Multiple-imputation estimates     Imputations     =         10
Mean estimation                   Number of obs   =     64,841
                                  Average RVI     =     0.0122
                                  Largest FMI     =     0.0019
                                  Complete DF     =      64840
DF adjustment:   Small sample     DF:     min     =  63,126.41
                                          avg     =  63,982.21
Within VCE type:       Robust             max     =  64,838.00

--------------------------------------------------------------
             |       Mean   Std. err.     [95% conf. interval]
-------------+------------------------------------------------
    duration |   22.08807   .0764533      21.93822    22.23792
   durationy |   1.840166   .0064328      1.827558    1.852775
--------------------------------------------------------------

. 
. * use column (5) controls
. 
. eststo durationmmi`imputation' : mi estimate, post saving(durationmmi, replace) : poisson duration summer `co
> l5controls' i.intyr [pw=weight] 

Multiple-imputation estimates                   Imputations       =         10
Poisson regression                              Number of obs     =     64,841
                                                Average RVI       =     0.0070
                                                Largest FMI       =     0.0345
DF adjustment:   Large sample                   DF:     min       =   7,668.79
                                                        avg       = 368,946.41
                                                        max       = 868,985.50
Model F test:       Equal FMI                   F(  20, 3.4e+06)  =      42.09
Within VCE type:       Robust                   Prob > F          =     0.0000

------------------------------------------------------------------------------
    duration | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0200586   .0071562     2.80   0.005     .0060304    .0340867
        zinc |   .0848891   .0040035    21.20   0.000     .0770423    .0927359
         per |   .0394404   .0029904    13.19   0.000     .0335793    .0453015
      zadult |  -.0745206   .0061628   -12.09   0.000    -.0865995   -.0624416
             |
      region |
          2  |  -.0324341   .0119028    -2.72   0.006    -.0557631    -.009105
          3  |  -.0399935   .0111033    -3.60   0.000    -.0617556   -.0182313
          4  |   -.044443   .0115953    -3.83   0.000    -.0671694   -.0217167
             |
      METRO3 |
          2  |   .0317148   .0083583     3.79   0.000     .0153329    .0480968
          3  |   .0435087   .0134534     3.23   0.001     .0171405     .069877
          4  |  -.0403247   .0138794    -2.91   0.004    -.0675281   -.0131213
          5  |   .0281328   .0144087     1.95   0.051    -.0001078    .0563734
          7  |   .0441897   .0101072     4.37   0.000     .0243799    .0639995
             |
       intyr |
       2001  |   -.003357   .0133735    -0.25   0.802    -.0295686    .0228546
       2002  |  -.0273814   .0142719    -1.92   0.055    -.0553542    .0005914
       2003  |  -.0012613    .013204    -0.10   0.924     -.027141    .0246183
       2004  |   .0198268   .0145779     1.36   0.174    -.0087454     .048399
       2005  |   .0193106   .0131772     1.47   0.143    -.0065164    .0451377
       2007  |  -.0480293   .0134385    -3.57   0.000    -.0743684   -.0216901
       2009  |  -.0277554   .0133664    -2.08   0.038    -.0539534   -.0015574
       2011  |  -.0031446   .0136348    -0.23   0.818     -.029869    .0235797
             |
       _cons |   2.263856   .0430836    52.55   0.000     2.179413    2.348299
------------------------------------------------------------------------------

. estadd local method = "`imputation'"

added macro:
             e(method) : "B"

. eststo durationymi`imputation' : mi estimate , post saving(durationymi, replace) : poisson durationy summer `
> col5controls' i.intyr [pw=weight]  

Multiple-imputation estimates                   Imputations       =         10
Poisson regression                              Number of obs     =     64,841
                                                Average RVI       =     0.0021
                                                Largest FMI       =     0.0419
DF adjustment:   Large sample                   DF:     min       =   5,218.18
                                                        avg       =   1.20e+11
                                                        max       =   9.33e+11
Model F test:       Equal FMI                   F(  20, 3.6e+07)  =      39.93
Within VCE type:       Robust                   Prob > F          =     0.0000

------------------------------------------------------------------------------
   durationy | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0201854    .007252     2.78   0.005     .0059683    .0344024
        zinc |   .0814106   .0039699    20.51   0.000     .0736297    .0891914
         per |   .0389963   .0030288    12.88   0.000       .03306    .0449326
      zadult |  -.0754433   .0062062   -12.16   0.000    -.0876072   -.0632795
             |
      region |
          2  |  -.0304307   .0120331    -2.53   0.011    -.0540152   -.0068462
          3  |  -.0383059   .0112423    -3.41   0.001    -.0603405   -.0162714
          4  |  -.0425543    .011794    -3.61   0.000    -.0656702   -.0194384
             |
      METRO3 |
          2  |    .033535   .0084123     3.99   0.000     .0170472    .0500228
          3  |   .0522337   .0135072     3.87   0.000     .0257601    .0787073
          4  |  -.0377007   .0140227    -2.69   0.007    -.0651847   -.0102168
          5  |   .0246871   .0147464     1.67   0.094    -.0042153    .0535895
          7  |     .03849   .0102052     3.77   0.000     .0184882    .0584917
             |
       intyr |
       2001  |   .0061668   .0137025     0.45   0.653    -.0206896    .0330231
       2002  |  -.0056843   .0145174    -0.39   0.695     -.034138    .0227694
       2003  |    .021893   .0134386     1.63   0.103    -.0044461    .0482322
       2004  |   .0414592   .0148272     2.80   0.005     .0123984    .0705201
       2005  |   .0389359   .0133274     2.92   0.003     .0128147    .0650572
       2007  |  -.0258167   .0136889    -1.89   0.059    -.0526464     .001013
       2009  |  -.0098789   .0135964    -0.73   0.467    -.0365273    .0167695
       2011  |   .0057748   .0139263     0.41   0.678    -.0215201    .0330698
             |
       _cons |  -.1999821   .0427875    -4.67   0.000    -.2838441   -.1161201
------------------------------------------------------------------------------

. estadd local method = "`imputation'"

added macro:
             e(method) : "B"

. 
. 
. 
. *******************************************************************************
. * C. Impute DURATION from EMPIRICAL Distribution:
. /*
> Assume that movm, move, pmovyr are correct ...
> ... impute pmovm by drawing at random from empirical distribution ...
> ... of durations, among durations that would ensure the original move ...
> ... is in the stated year (pmovyr)
> */
. 
. set seed 57

. 
. use `ForImputations', clear

. drop in 1/L  // drops all observations, but keeps variables
(713,251 observations deleted)

. save `gather_all_groups'
(dataset contains 0 observations)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format

. 
. foreach g of numlist `group_levels' {
  2.   use `ForImputations', clear
  3.   keep if group_duration == `g'
  4.   quietly sum m_d
  5.   local min = r(mean)
  6.   quietly sum M_d
  7.   local max = r(mean)
  8.   local n_g = _N
  9.   
.   save `tempgroup', replace
 10.   
.   use `durations', clear
 11.   keep if inrange(duration_imp , `min', `max')
 12.   cap bsample `n_g'        
 13.   // ... sample from empirical distribution of durations that are feasible
.   merge 1:1 _n using `tempgroup', nogen
 14.   
.   append using `gather_all_groups'
 15.   save `gather_all_groups', replace
 16. 
. }
(711,502 observations deleted)
(file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp not found)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,256,140 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             1,749  
    -----------------------------------------
(label mv_lbl already defined)
(label month_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(711,249 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,241,080 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,002  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,413 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,223,060 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,838  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(709,357 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,199,520 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             3,894  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(707,234 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,175,000 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             6,017  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(706,057 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,146,920 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,194  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(704,825 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,114,520 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             8,426  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(700,425 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,083,160 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            12,826  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(703,912 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,054,620 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             9,339  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(702,735 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,025,660 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            10,516  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(702,603 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(994,880 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            10,648  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(703,285 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(959,700 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             9,966  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(696,454 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(902,140 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            16,797  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(694,573 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(870,720 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            18,678  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(693,242 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(858,960 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            20,009  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(691,559 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(854,440 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            21,692  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(688,468 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(854,640 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            24,783  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(687,467 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(859,160 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            25,784  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(689,623 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(865,980 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            23,628  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(684,277 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(873,620 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            28,974  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(693,330 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(879,320 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            19,921  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(695,882 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(884,040 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            17,369  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(699,204 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(890,900 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            14,047  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(700,700 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(897,940 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            12,551  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(699,633 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(942,300 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            13,618  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(699,402 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(956,080 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            13,849  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(698,676 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(960,560 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            14,575  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(697,070 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(966,120 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            16,181  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(695,805 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(968,340 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            17,446  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(694,331 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(973,020 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            18,920  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(695,750 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(979,540 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            17,501  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(693,110 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(985,240 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            20,141  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(699,490 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(991,400 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            13,761  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(699,369 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(998,540 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            13,882  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(701,338 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,006,380 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            11,913  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(703,076 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,016,080 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            10,175  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(705,045 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,039,620 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             8,206  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(704,506 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,052,840 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             8,745  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(703,659 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,061,180 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             9,592  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(703,098 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,068,860 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            10,153  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(702,493 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,076,580 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            10,758  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(701,195 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,081,180 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            12,056  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(702,625 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,087,320 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            10,626  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(700,876 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,093,020 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            12,375  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(704,396 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,099,080 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             8,855  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(704,187 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,104,260 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             9,064  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(705,606 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,109,480 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,645  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(706,222 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,116,780 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,029  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(707,256 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,131,100 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             5,995  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(707,498 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,140,020 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             5,753  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(707,388 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,148,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             5,863  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(706,134 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,155,700 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,117  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(706,387 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,163,540 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             6,864  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(706,134 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,170,980 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             7,117  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(706,497 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,178,660 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             6,754  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(706,585 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,185,900 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             6,666  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(709,401 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,192,220 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             3,850  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(709,621 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,199,000 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             3,630  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,215 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,205,840 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             3,036  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,369 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,213,260 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,882  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,842 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,224,400 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,409  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,644 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,231,360 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,607  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,391 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,237,320 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,860  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,380 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,243,700 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,871  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,468 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,248,880 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,783  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(710,622 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,254,860 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,629  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(711,095 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,259,280 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,156  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(711,865 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,263,940 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             1,386  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(712,613 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,268,080 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               638  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(712,998 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,273,180 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                               253  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,207 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,277,180 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                44  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,280,900 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,285,760 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,289,360 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,293,100 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,218 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,295,320 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                33  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,140 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,760 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,680 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,700 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,229 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,700 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                22  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,720 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,700 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,680 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,780 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,760 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,760 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,720 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,720 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,720 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,720 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,780 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,780 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,780 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format
(713,240 observations deleted)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000006.tmp saved as .dta format
(1,296,800 observations deleted)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                11  
    -----------------------------------------
(label month_lbl already defined)
(label mv_lbl already defined)
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000005.tmp saved as .dta format

.  
. use `gather_all_groups', clear

. 
. 
. 
. replace duration = duration_imp if ( pmovm == 1 & imputation_random > `imp_fraction' & m > 0 ) 
(20,260 real changes made)

. replace pmovm = month(dofm(ym(move,movm) - duration ))
(20,260 real changes made)

. replace summer = inrange(pmovm ,4,9)
(11,081 real changes made)

. 
. * end of imputation step (C)
. *******************************************************************************
. 
. ******************************************************************************
. * ANALYSIS, REGARDLESS OF WHICH IMPUTATION APPROACH
. 
. cap drop movedate pmovedate duration durationy summer

. 
. cap gen impflag = (pmovm==1 & m==0)

. 
. gen movedate = ym(move,movm)

. gen pmovedate = ym(pmovyr,pmovm)

. gen duration = movedate - pmovedate

.  
. gen durationy = move-pmovyr

. 
. gen summer = inrange(pmovm ,4, 9) if !mi(pmovm)

. label var summer "Summer"

. 
. graph box duration, over(pmovm) noout

. 
. if "`imputation'"=="A" {
. local titletext = "Prior Move Month Imputed from Empirical Distribution"
. }

. if "`imputation'"=="B" {
. local titletext = "Prior Move Month Imputed from Uniform Distribution"
. }

. if "`imputation'"=="C" {
. local titletext = "Duration Imputed from Empirical Distribution"
. }

. 
. 
. preserve

. collapse (mean) duration durationy , by(pmovm m)

. tw scatter duration pmovm if m == 0, mcolor(blue) msymbol(square_hollow)  msize(large) ysc(log) ///
>   || scatter durationy pmovm if m == 0, mcolor(red)  msymbol(circle_hollow) msize(large) yaxis(2)  ysc(log)  
> ///
>   || scatter duration pmovm if m > 0 , mcolor(blue) msymbol(smsquare) msize(small)  ///
>   || scatter durationy pmovm if m >0 ,  mcolor(red) msymbol(smcircle) msize(small) yaxis(2) ///
>   yti("Duration (months)", color(blue)) ///
>   yti("Duration (years)", axis(2) color(red)) ///
>   ti(`titletext') ///
>   legend(off) ysc(axis(1) lcolor(blue)) ysc(axis(2) lcolor(red)) ///
>   ylab( , labcolor(blue) tlcolor(blue)) ///
>   ylab( , axis(2) labcolor(red) tlcolor(red)) ///
>   xlab( $months ) xti("Prior Move Month") saving(imputed`imputation', replace) 
file imputedC.gph saved

. graph export pmovmscatter_imputed`imputation'.pdf, as(pdf) replace
file pmovmscatter_imputedC.pdf saved as PDF format

. 
. restore

. 
. ******************************************************************************
. *  DURATION OF OCCUPANCY
. ******************************************************************************
. 
. * basic regression
. 
. save `imputed' , replace
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000003.tmp saved as .dta format

. 
. ********************************************************************************
. 
. replace pmovm = . if impflag==1   /* listwise deletion */
(6,577 real changes made, 6,577 to missing)

. replace duration = . if impflag==1 
(6,577 real changes made, 6,577 to missing)

. replace summer = . if impflag == 1
(6,577 real changes made, 6,577 to missing)

. 
. save `mi', replace
file C:\Users\DSCRIM~1\AppData\Local\Temp\ST_1c2c_000009.tmp saved as .dta format

. 
. * Declaration of mi dataset
. mi import flong , m(m) id(newid) imputed(duration pmovm summer )
(6577 m=0 obs now marked as incomplete)

. 
. save "$parent/data/miAHSForAnalysis.dta", replace
file G:\My Drive\research\HotColdReplication/data/miAHSForAnalysis.dta saved

. 
. eststo sumstats`imputation' : mi estimate , post saving(sumstatsmi, replace) : mean duration durationy [pw=we
> ight]

Multiple-imputation estimates     Imputations     =         10
Mean estimation                   Number of obs   =     64,841
                                  Average RVI     =     0.0053
                                  Largest FMI     =     0.0008
                                  Complete DF     =      64840
DF adjustment:   Small sample     DF:     min     =  64,488.43
                                          avg     =  64,663.21
Within VCE type:       Robust             max     =  64,838.00

--------------------------------------------------------------
             |       Mean   Std. err.     [95% conf. interval]
-------------+------------------------------------------------
    duration |   22.08176   .0763458      21.93212     22.2314
   durationy |   1.840166   .0064328      1.827558    1.852775
--------------------------------------------------------------

. 
. * use column (5) controls
. 
. eststo durationmmi`imputation' : mi estimate, post saving(durationmmi, replace) : poisson duration summer `co
> l5controls' i.intyr [pw=weight] 

Multiple-imputation estimates                   Imputations       =         10
Poisson regression                              Number of obs     =     64,841
                                                Average RVI       =     0.0076
                                                Largest FMI       =     0.0601
DF adjustment:   Large sample                   DF:     min       =   2,555.88
                                                        avg       = 596,489.76
                                                        max       = 2399497.76
Model F test:       Equal FMI                   F(  20, 2.8e+06)  =      42.13
Within VCE type:       Robust                   Prob > F          =     0.0000

------------------------------------------------------------------------------
    duration | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0210121   .0072466     2.90   0.004     .0068023    .0352219
        zinc |   .0849254   .0039971    21.25   0.000     .0770912    .0927595
         per |   .0394179   .0029916    13.18   0.000     .0335545    .0452814
      zadult |  -.0745599   .0061621   -12.10   0.000    -.0866375   -.0624823
             |
      region |
          2  |  -.0326659   .0118922    -2.75   0.006    -.0559741   -.0093576
          3  |  -.0400251   .0111019    -3.61   0.000    -.0617846   -.0182657
          4  |  -.0445529   .0115906    -3.84   0.000    -.0672701   -.0218357
             |
      METRO3 |
          2  |   .0317863   .0083531     3.81   0.000     .0154144    .0481581
          3  |   .0434187   .0135073     3.21   0.001     .0169444    .0698929
          4  |  -.0403531   .0138471    -2.91   0.004     -.067493   -.0132133
          5  |   .0283592   .0144222     1.97   0.049      .000092    .0566263
          7  |   .0441246   .0100892     4.37   0.000     .0243501    .0638992
             |
       intyr |
       2001  |   -.003584   .0133719    -0.27   0.789    -.0297925    .0226245
       2002  |  -.0270236   .0142671    -1.89   0.058     -.054987    .0009399
       2003  |  -.0009551   .0131802    -0.07   0.942    -.0267879    .0248776
       2004  |   .0200683   .0145575     1.38   0.168    -.0084641    .0486006
       2005  |   .0196119    .013152     1.49   0.136    -.0061656    .0453893
       2007  |  -.0474595   .0134202    -3.54   0.000    -.0737626   -.0211563
       2009  |  -.0276823   .0133201    -2.08   0.038    -.0537894   -.0015752
       2011  |  -.0028271   .0135816    -0.21   0.835    -.0294467    .0237925
             |
       _cons |   2.262625    .042965    52.66   0.000     2.178415    2.346835
------------------------------------------------------------------------------

. estadd local method = "`imputation'"

added macro:
             e(method) : "C"

. eststo durationymi`imputation' : mi estimate , post saving(durationymi, replace) : poisson durationy summer `
> col5controls' i.intyr [pw=weight]  

Multiple-imputation estimates                   Imputations       =         10
Poisson regression                              Number of obs     =     64,841
                                                Average RVI       =     0.0036
                                                Largest FMI       =     0.0705
DF adjustment:   Large sample                   DF:     min       =   1,863.64
                                                        avg       =   1.35e+11
                                                        max       =   6.03e+11
Model F test:       Equal FMI                   F(  20, 1.2e+07)  =      39.86
Within VCE type:       Robust                   Prob > F          =     0.0000

------------------------------------------------------------------------------
   durationy | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      summer |   .0205399   .0073611     2.79   0.005     .0061031    .0349768
        zinc |   .0814123   .0039698    20.51   0.000     .0736316    .0891931
         per |   .0389967   .0030289    12.87   0.000     .0330601    .0449332
      zadult |  -.0754521   .0062063   -12.16   0.000    -.0876162    -.063288
             |
      region |
          2  |  -.0304233   .0120332    -2.53   0.011    -.0540078   -.0068387
          3  |   -.038293   .0112425    -3.41   0.001    -.0603279   -.0162581
          4  |  -.0425392   .0117938    -3.61   0.000    -.0656547   -.0194238
             |
      METRO3 |
          2  |   .0335552   .0084124     3.99   0.000     .0170672    .0500433
          3  |     .05226   .0135076     3.87   0.000     .0257857    .0787344
          4  |  -.0376934   .0140227    -2.69   0.007    -.0651773   -.0102094
          5  |   .0247234   .0147459     1.68   0.094     -.004178    .0536249
          7  |   .0384865   .0102052     3.77   0.000     .0184847    .0584882
             |
       intyr |
       2001  |   .0061318   .0137026     0.45   0.655    -.0207247    .0329883
       2002  |  -.0056671   .0145179    -0.39   0.696    -.0341216    .0227874
       2003  |   .0218838   .0134388     1.63   0.103    -.0044557    .0482233
       2004  |   .0414616   .0148271     2.80   0.005      .012401    .0705223
       2005  |   .0389077   .0133271     2.92   0.004      .012787    .0650283
       2007  |  -.0258399   .0136887    -1.89   0.059    -.0526693    .0009895
       2009  |  -.0098973   .0135962    -0.73   0.467    -.0365454    .0167508
       2011  |   .0057828    .013926     0.42   0.678    -.0215117    .0330773
             |
       _cons |  -.2002032   .0428072    -4.68   0.000    -.2841038   -.1163026
------------------------------------------------------------------------------

. estadd local method = "`imputation'"

added macro:
             e(method) : "C"

. 
. 
. 
. 
. graph combine imputedA.gph imputedB.gph imputedC.gph

. graph export "$parent/results/migraph.pdf", as(pdf) replace
file G:\My Drive\research\HotColdReplication/results/migraph.pdf saved as PDF format

. 
. 
. esttab sumstats* using "$parent/results/means.tex", label se nostar ///
>   mti keep(duration durationy) replace
(output written to G:\My Drive\research\HotColdReplication/results/means.tex)

. 
. esttab durationm durationmmi* durationy durationymi* using "$parent/results/miregs.tex", ///
>    keep(summer zinc per zadult ) ///
>    indicate("Region fixed effects =  *.region"   ///
>    "Urban status effects = *.METRO3" ///
>    "Year dummies= *.intyr") ///
>    replace se scalars("method Imputation Method") nobaselevels  eqlabels(none) ///
>    label nostar compress nogaps ///
>    mgroups("Duration (months)" "Duration (years)" , pattern( 1 0 0 0 1 0 0 0 ) span prefix(\multicolumn{@span
> }{c}{) suffix(})) nodepvar nomti
(output written to G:\My Drive\research\HotColdReplication/results/miregs.tex)

. 
. 
. 
. 
. local second = c(current_time)

. 
. 
. di "`start'"
16:40:46

. di "`first'"
16:40:46

. di "`second'"
16:47:09

. di c(current_time)
16:47:09

. 
. log close
      name:  <unnamed>
       log:  G:\My Drive\research\HotColdReplication\results/MasterAHS.txt
  log type:  text
 closed on:   2 Jun 2022, 16:47:09
---------------------------------------------------------------------------------------------------------------
