We use a simple example to clarify Stata bootstrap algorithm and our coding error. Our simple data set is
use "check_data.dta", clear
xtset ID
list
Panel variable: ID (balanced)
+---------------------------------+
| ID year X Y |
|---------------------------------|
1. | 1 2009 3.96078 10.82663 |
2. | 1 2010 4.777452 10.68045 |
3. | 1 2011 5.253614 10.37472 |
4. | 1 2012 6.620269 10.52382 |
5. | 1 2013 7.22822 10.88551 |
|---------------------------------|
6. | 2 2009 6.293743 20.04308 |
7. | 2 2010 7.429042 20.04353 |
8. | 2 2011 8.782087 20.3393 |
9. | 2 2012 9.068334 20.67591 |
10. | 2 2013 10.97283 20.2636 |
|---------------------------------|
11. | 3 2009 9.125316 30.74265 |
12. | 3 2010 10.13114 30.82197 |
13. | 3 2011 11.90619 30.0979 |
14. | 3 2012 12.72111 30.28484 |
15. | 3 2013 13.49351 30.46046 |
+---------------------------------+
To understand how Stata draws observations when we use cluster command, we compare a standard bootstrap with a block (cluster) bootstrap.In this exercise, we regress Y on X and get standard errors from a bootstrap. The following code is to run a standard bootstrap for 50 repetitions.
bootstrap, reps(50) seed(123) saving("check_c",replace): reg Y X
(running regress on estimation sample)
Bootstrap replications (50): .........10.........20.........30.........40.........50
> done
Linear regression Number of obs = 15
Replications = 50
Wald chi2(1) = 54.32
Prob > chi2 = 0.0000
R-squared = 0.7232
Adj R-squared = 0.7019
Root MSE = 4.5760
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
Y | coefficient std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
X | 2.433785 .3302071 7.37 0.000 1.786591 3.080979
_cons | -.2589922 2.942226 -0.09 0.930 -6.02565 5.507665
------------------------------------------------------------------------------
OLS estimates in each repetition are stored in the “check_c” file.
use "check_c.dta", clear
list
(bootstrap: regress)
+----------------------+
| _b_X _b_cons |
|----------------------|
1. | 2.138077 .5576385 |
2. | 2.417894 -.7642964 |
3. | 1.693039 6.641975 |
4. | 3.05896 -4.37361 |
5. | 2.187195 .6708606 |
|----------------------|
6. | 2.430729 .8148106 |
7. | 2.593253 -1.905666 |
8. | 2.674258 -.1598216 |
9. | 2.188795 1.348569 |
10. | 2.020593 1.501604 |
|----------------------|
11. | 2.432382 -.7704033 |
12. | 2.584248 -.7272254 |
13. | 1.747556 6.859074 |
14. | 2.238197 3.712923 |
15. | 2.437271 -2.209589 |
|----------------------|
16. | 1.648717 6.51654 |
17. | 2.717264 -2.56621 |
18. | 2.02047 5.002777 |
19. | 2.460462 -.4938909 |
20. | 2.527794 -1.437341 |
|----------------------|
21. | 2.328885 .048876 |
22. | 2.326322 2.270131 |
23. | 2.488114 1.471417 |
24. | 2.291409 2.62575 |
25. | 2.33052 1.138789 |
|----------------------|
26. | 3.205872 -5.360022 |
27. | 2.152287 2.59953 |
28. | 2.213326 .0051833 |
29. | 3.301715 -9.769567 |
30. | 2.661102 .0862941 |
|----------------------|
31. | 2.170336 2.193878 |
32. | 2.166642 1.234382 |
33. | 2.619741 -.7812752 |
34. | 2.111542 .9451756 |
35. | 2.25625 .9069682 |
|----------------------|
36. | 2.189938 2.277627 |
37. | 2.554644 -1.451359 |
38. | 2.226695 1.243645 |
39. | 2.168588 .7011353 |
40. | 2.699125 -1.588767 |
|----------------------|
41. | 2.320445 -.2368655 |
42. | 2.422203 .3315688 |
43. | 2.663802 -1.305801 |
44. | 2.309478 2.289144 |
45. | 2.41109 -.4334617 |
|----------------------|
46. | 2.341678 1.177642 |
47. | 2.48314 -.049209 |
48. | 2.849747 -5.127273 |
49. | 2.412701 -1.892364 |
50. | 1.905824 2.818149 |
+----------------------+
The standard deviation of these estimates of X (_b_X variable) should correspond to the bootstrap standard error above.
su _b_X,d
scalar std_c = r(sd)
_b[X]
-------------------------------------------------------------
Percentiles Smallest
1% 1.648717 1.648717
5% 1.747556 1.693039
10% 2.020531 1.747556 Obs 50
25% 2.187195 1.905824 Sum of wgt. 50
50% 2.336099 Mean 2.376006
Largest Std. dev. .3302071
75% 2.554644 2.849747
90% 2.708195 3.05896 Variance .1090367
95% 3.05896 3.205872 Skewness .4210463
99% 3.301715 3.301715 Kurtosis 4.007335
scalar list std_c
std_c = .33020705
We move to a block (cluster) bootstrap. The key objective of this exercise is to make sure that in the block bootstrap Stata draws all observations for a given firm when it picks up a firm at random by block bootstrap. (We were initially not quite sure if that was the case or whether perhaps Stata would pick just some, not all observations from each firm (block) it selected for bootstrap.) Load our simple data set.
use "check_data.dta", clear
xtset ID
list
Panel variable: ID (balanced)
+---------------------------------+
| ID year X Y |
|---------------------------------|
1. | 1 2009 3.96078 10.82663 |
2. | 1 2010 4.777452 10.68045 |
3. | 1 2011 5.253614 10.37472 |
4. | 1 2012 6.620269 10.52382 |
5. | 1 2013 7.22822 10.88551 |
|---------------------------------|
6. | 2 2009 6.293743 20.04308 |
7. | 2 2010 7.429042 20.04353 |
8. | 2 2011 8.782087 20.3393 |
9. | 2 2012 9.068334 20.67591 |
10. | 2 2013 10.97283 20.2636 |
|---------------------------------|
11. | 3 2009 9.125316 30.74265 |
12. | 3 2010 10.13114 30.82197 |
13. | 3 2011 11.90619 30.0979 |
14. | 3 2012 12.72111 30.28484 |
15. | 3 2013 13.49351 30.46046 |
+---------------------------------+
The following code is to run a block bootstrap for 50 repetitions.
bootstrap, reps(50) seed(123) cluster(ID) idcluster(Newid) saving("check_p", replace): reg Y X
> e): reg Y X
(running regress on estimation sample)
Bootstrap replications (50): .........10.........20.........30.........40.........50
> done
Linear regression Number of obs = 15
Replications = 50
Wald chi2(1) = 7.16
Prob > chi2 = 0.0075
R-squared = 0.7232
Adj R-squared = 0.7019
Root MSE = 4.5760
(Replications based on 3 clusters in ID)
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
Y | coefficient std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
X | 2.433785 .9097357 2.68 0.007 .6507359 4.216834
_cons | -.2589922 8.415041 -0.03 0.975 -16.75217 16.23419
------------------------------------------------------------------------------
We can check the distribution of OLS estimates stored in the “check_p” file. The standard deviation of these estimates of X (_b_X variable) should be the same as the bootstrap standard error above.
use "check_p.dta", clear
su _b_X,d
scalar std_p = r(sd)
(bootstrap: regress)
_b[X]
-------------------------------------------------------------
Percentiles Smallest
1% -.1159865 -.1159865
5% .0051345 -.1159865
10% .041567 .0051345 Obs 50
25% 1.450909 .0051345 Sum of wgt. 50
50% 1.576175 Mean 1.655174
Largest Std. dev. .9097357
75% 2.433785 2.704328
90% 2.586121 2.704328 Variance .827619
95% 2.704328 2.704328 Skewness -.7171314
99% 2.704328 2.704328 Kurtosis 2.423586
scalar list std_p
std_p = .90973567
To investigate where these estimates come from, we cross-tabulate these estimates of X and a constant.
tab _b_X _b_cons
| _b[_cons]
_b[X] | -3.117049 -.7107261 -.2589922 2.658958 5.201381 | Total
-----------+-------------------------------------------------------+----------
-.1159865 | 0 0 0 0 0 | 2
.0051345 | 0 0 0 0 0 | 3
.0779996 | 0 0 0 0 0 | 4
1.450909 | 0 0 0 0 0 | 8
1.501025 | 0 0 0 0 0 | 5
1.576175 | 0 0 0 0 6 | 6
1.710974 | 0 0 0 2 0 | 2
2.433785 | 0 0 10 0 0 | 10
2.586121 | 0 6 0 0 0 | 6
2.704328 | 4 0 0 0 0 | 4
-----------+-------------------------------------------------------+----------
Total | 4 6 10 2 6 | 50
| _b[_cons]
_b[X] | 9.419242 10.62963 11.86349 19.60937 31.81256 | Total
-----------+-------------------------------------------------------+----------
-.1159865 | 0 0 0 0 2 | 2
.0051345 | 0 3 0 0 0 | 3
.0779996 | 0 0 0 4 0 | 4
1.450909 | 0 0 8 0 0 | 8
1.501025 | 5 0 0 0 0 | 5
1.576175 | 0 0 0 0 0 | 6
1.710974 | 0 0 0 0 0 | 2
2.433785 | 0 0 0 0 0 | 10
2.586121 | 0 0 0 0 0 | 6
2.704328 | 0 0 0 0 0 | 4
-----------+-------------------------------------------------------+----------
Total | 5 3 8 4 2 | 50
As we can see above, these estimates come from 10 possible combinations of blocks (IDs). For instance, suppose that Stata picks ID=1, ID=1, and ID=2. In this case, our data are
use "check_data_ID_1.dta", clear
append using "check_data_ID_1.dta"
append using "check_data_ID_2.dta"
list
| ID year X Y |
|---------------------------------|
1. | 1 2009 3.96078 10.82663 |
2. | 1 2010 4.777452 10.68045 |
3. | 1 2011 5.253614 10.37472 |
4. | 1 2012 6.620269 10.52382 |
5. | 1 2013 7.22822 10.88551 |
|---------------------------------|
6. | 1 2009 3.96078 10.82663 |
7. | 1 2010 4.777452 10.68045 |
8. | 1 2011 5.253614 10.37472 |
9. | 1 2012 6.620269 10.52382 |
10. | 1 2013 7.22822 10.88551 |
|---------------------------------|
11. | 2 2009 6.293743 20.04308 |
12. | 2 2010 7.429042 20.04353 |
13. | 2 2011 8.782087 20.3393 |
14. | 2 2012 9.068334 20.67591 |
15. | 2 2013 10.97283 20.2636 |
+---------------------------------+
We use this data set to regress Y on X.
reg Y X
estimates store m1
Source | SS df MS Number of obs = 15
-------------+---------------------------------- F(1, 13) = 14.55
Model | 163.078415 1 163.078415 Prob > F = 0.0021
Residual | 145.703509 13 11.2079622 R-squared = 0.5281
-------------+---------------------------------- Adj R-squared = 0.4918
Total | 308.781924 14 22.0558517 Root MSE = 3.3478
------------------------------------------------------------------------------
Y | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
X | 1.710973 .4485474 3.81 0.002 .7419457 2.680001
_cons | 2.658958 3.06184 0.87 0.401 -3.955745 9.273661
------------------------------------------------------------------------------
The estimates (1.710973, 2.658958) are in the cross-tabulation above. This means that Stata chooses IDs randomly and draws all the observations of a firm. We can check other estimates in a similar way.
use "check_data_ID_1.dta", clear
append using "check_data_ID_1.dta"
append using "check_data_ID_1.dta"
quietly: reg Y X
estimates store m2
use "check_data_ID_1.dta", clear
append using "check_data_ID_1.dta"
append using "check_data_ID_3.dta"
quietly: reg Y X
estimates store m3
use "check_data_ID_1.dta", clear
append using "check_data_ID_2.dta"
append using "check_data_ID_2.dta"
quietly: reg Y X
estimates store m4
use "check_data_ID_1.dta", clear
append using "check_data_ID_3.dta"
append using "check_data_ID_3.dta"
quietly: reg Y X
estimates store m5
use "check_data_ID_2.dta", clear
append using "check_data_ID_2.dta"
append using "check_data_ID_3.dta"
quietly: reg Y X
estimates store m6
use "check_data_ID_2.dta", clear
append using "check_data_ID_3.dta"
append using "check_data_ID_3.dta"
quietly: reg Y X
estimates store m7
use "check_data_ID_2.dta", clear
append using "check_data_ID_2.dta"
append using "check_data_ID_2.dta"
quietly: reg Y X
estimates store m8
use "check_data_ID_3.dta", clear
append using "check_data_ID_3.dta"
append using "check_data_ID_3.dta"
quietly: reg Y X
estimates store m9
use "check_data_ID_1.dta", clear
append using "check_data_ID_2.dta"
append using "check_data_ID_3.dta"
quietly: reg Y X
estimates store m10
The estimates from these OLS regressions are
estimates tab m1 m2 m3 m4 m5 m6 m7 m8 m9 m10
Variable | m1 m2 m3 m4 m5
-------------+-----------------------------------------------------------------
X | 1.7109734 .00513446 2.7043283 1.576175 2.5861213
_cons | 2.6589585 10.629635 -3.1170485 5.2013813 -.71072607
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Variable | m6 m7 m8 m9 m10
-------------+-----------------------------------------------------------------
X | 1.5010249 1.4509086 .07799959 -.11598655 2.4337851
_cons | 9.4192416 11.863486 19.609368 31.812562 -.25899216
-------------------------------------------------------------------------------
The estimates on X from the block bootstrap are displayed again.
use "check_p.dta", clear
tab _b_X
(bootstrap: regress)
_b[X] | Freq. Percent Cum.
------------+-----------------------------------
-.1159865 | 2 4.00 4.00
.0051345 | 3 6.00 10.00
.0779996 | 4 8.00 18.00
1.450909 | 8 16.00 34.00
1.501025 | 5 10.00 44.00
1.576175 | 6 12.00 56.00
1.710974 | 2 4.00 60.00
2.433785 | 10 20.00 80.00
2.586121 | 6 12.00 92.00
2.704328 | 4 8.00 100.00
------------+-----------------------------------
Total | 50 100.00
We have now confirmed that all the observations of a firm are drawn when that firm is randomly chosen by block bootstrap.
We continue to use our simple data.
use "check_data.dta", clear
xtset ID
list
Panel variable: ID (balanced)
+---------------------------------+
| ID year X Y |
|---------------------------------|
1. | 1 2009 3.96078 10.82663 |
2. | 1 2010 4.777452 10.68045 |
3. | 1 2011 5.253614 10.37472 |
4. | 1 2012 6.620269 10.52382 |
5. | 1 2013 7.22822 10.88551 |
|---------------------------------|
6. | 2 2009 6.293743 20.04308 |
7. | 2 2010 7.429042 20.04353 |
8. | 2 2011 8.782087 20.3393 |
9. | 2 2012 9.068334 20.67591 |
10. | 2 2013 10.97283 20.2636 |
|---------------------------------|
11. | 3 2009 9.125316 30.74265 |
12. | 3 2010 10.13114 30.82197 |
13. | 3 2011 11.90619 30.0979 |
14. | 3 2012 12.72111 30.28484 |
15. | 3 2013 13.49351 30.46046 |
+---------------------------------+
First, we use Stata ado file, bootstrap_check_1, that mimics our AER boos_2sls_1. We basically generate X_cum from X for each ID, and then regress Y on X_cum. he mistake in our ado file was that we used ID.
program bootstrap_check_1,rclass
version 16
tempname b V
capture drop X_cum
sort ID year
by ID: gen X_cum = sum(X)
reg Y X_cum
matrix `b' = e(b)
matrix `V' = e(V)
ereturn post `b' `V'
end
We do a block bootstrap by Stata.
generate newid = ID
tsset newid year
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
bootstrap _b _se, rep(50) seed(123) cluster(ID) idcluster(newid) saving("check_code_1", replace) nowarn: bootstrap_check_1
Panel variable: newid (strongly balanced)
Time variable: year, 2009 to 2013
Delta: 1 unit
(running bootstrap_check_1 on estimation sample)
Bootstrap replications (50): .........10.........20.........30.........40.........50
> done
Bootstrap results Number of obs = 15
Replications = 50
(Replications based on 3 clusters in ID)
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
b |
X_cum | .2500074 .0980365 2.55 0.011 .0578593 .4421555
_cons | 14.59429 5.177171 2.82 0.005 4.447224 24.74136
-------------+----------------------------------------------------------------
se |
X_cum | .1324635 .050064 2.65 0.008 .0343398 .2305872
_cons | 3.695125 1.446516 2.55 0.011 .8600048 6.530245
------------------------------------------------------------------------------
The OLS estimates generated by the bootstrap are stored in the “check_code_1” file. To investigate where these estimates come from, we cross-tabulate these estimates.
use "check_code_1", clear
tab _b_X _b_cons
(bootstrap: bootstrap_check_1)
| _b[_cons]
_b[X_cum] | 10.64108 13.76844 14.59429 14.69029 15.17088 | Total
-----------+-------------------------------------------------------+----------
-.0397966 | 0 0 0 0 0 | 5
-.0318632 | 0 0 0 2 0 | 2
-.0028765 | 0 0 0 0 0 | 2
.0004337 | 3 0 0 0 0 | 3
.0037811 | 0 0 0 0 0 | 4
.070108 | 0 0 0 0 0 | 8
.0724891 | 0 0 0 0 4 | 4
.0991575 | 0 6 0 0 0 | 6
.1549924 | 0 0 0 0 0 | 6
.2500074 | 0 0 10 0 0 | 10
-----------+-------------------------------------------------------+----------
Total | 3 6 10 2 4 | 50
| _b[_cons]
_b[X_cum] | 17.04391 20.04064 23.79541 25.22751 30.72609 | Total
-----------+-------------------------------------------------------+----------
-.0397966 | 0 0 0 5 0 | 5
-.0318632 | 0 0 0 0 0 | 2
-.0028765 | 0 0 0 0 2 | 2
.0004337 | 0 0 0 0 0 | 3
.0037811 | 0 4 0 0 0 | 4
.070108 | 0 0 8 0 0 | 8
.0724891 | 0 0 0 0 0 | 4
.0991575 | 0 0 0 0 0 | 6
.1549924 | 6 0 0 0 0 | 6
.2500074 | 0 0 0 0 0 | 10
-----------+-------------------------------------------------------+----------
Total | 6 4 8 5 2 | 50
To see our mistake, suppose that Stata picks ID=1, ID=1, and ID=2. In this case, our data are
use "check_data_ID_1.dta", clear
append using "check_data_ID_1.dta"
append using "check_data_ID_2.dta"
list
| ID year X Y |
|---------------------------------|
1. | 1 2009 3.96078 10.82663 |
2. | 1 2010 4.777452 10.68045 |
3. | 1 2011 5.253614 10.37472 |
4. | 1 2012 6.620269 10.52382 |
5. | 1 2013 7.22822 10.88551 |
|---------------------------------|
6. | 1 2009 3.96078 10.82663 |
7. | 1 2010 4.777452 10.68045 |
8. | 1 2011 5.253614 10.37472 |
9. | 1 2012 6.620269 10.52382 |
10. | 1 2013 7.22822 10.88551 |
|---------------------------------|
11. | 2 2009 6.293743 20.04308 |
12. | 2 2010 7.429042 20.04353 |
13. | 2 2011 8.782087 20.3393 |
14. | 2 2012 9.068334 20.67591 |
15. | 2 2013 10.97283 20.2636 |
+---------------------------------+
We apply the bootstrap_check_1 ado file to this data set. We first calculate a cumulative sum of X.
sort ID year
by ID: gen X_cum = sum(X)
list
| ID year X Y X_cum |
|--------------------------------------------|
1. | 1 2009 3.96078 10.82663 3.96078 |
2. | 1 2009 3.96078 10.82663 7.921559 |
3. | 1 2010 4.777452 10.68045 12.69901 |
4. | 1 2010 4.777452 10.68045 17.47646 |
5. | 1 2011 5.253614 10.37472 22.73008 |
|--------------------------------------------|
6. | 1 2011 5.253614 10.37472 27.98369 |
7. | 1 2012 6.620269 10.52382 34.60396 |
8. | 1 2012 6.620269 10.52382 41.22423 |
9. | 1 2013 7.22822 10.88551 48.45245 |
10. | 1 2013 7.22822 10.88551 55.68067 |
|--------------------------------------------|
11. | 2 2009 6.293743 20.04308 6.293743 |
12. | 2 2010 7.429042 20.04353 13.72278 |
13. | 2 2011 8.782087 20.3393 22.50487 |
14. | 2 2012 9.068334 20.67591 31.57321 |
15. | 2 2013 10.97283 20.2636 42.54604 |
+--------------------------------------------+
There are two ID=1 firms, but they are treated as the same firm. Using ID to sort observations ends up with calculating a cumulative sum of X wrongly for ID=1 firm. When we use this data set and run regression, we obtain
reg Y X_cum
Source | SS df MS Number of obs = 15
-------------+---------------------------------- F(1, 13) = 0.16
Model | 3.67901674 1 3.67901674 Prob > F = 0.6986
Residual | 305.102907 13 23.4694544 R-squared = 0.0119
-------------+---------------------------------- Adj R-squared = -0.0641
Total | 308.781924 14 22.0558517 Root MSE = 4.8445
------------------------------------------------------------------------------
Y | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
X_cum | -.0318632 .0804777 -0.40 0.699 -.2057247 .1419982
_cons | 14.69029 2.434912 6.03 0.000 9.429983 19.9506
------------------------------------------------------------------------------
To display OLS estimates in the bootstrap,
use "check_code_1", clear
tab _b_X _b_cons
(bootstrap: bootstrap_check_1)
| _b[_cons]
_b[X_cum] | 10.64108 13.76844 14.59429 14.69029 15.17088 | Total
-----------+-------------------------------------------------------+----------
-.0397966 | 0 0 0 0 0 | 5
-.0318632 | 0 0 0 2 0 | 2
-.0028765 | 0 0 0 0 0 | 2
.0004337 | 3 0 0 0 0 | 3
.0037811 | 0 0 0 0 0 | 4
.070108 | 0 0 0 0 0 | 8
.0724891 | 0 0 0 0 4 | 4
.0991575 | 0 6 0 0 0 | 6
.1549924 | 0 0 0 0 0 | 6
.2500074 | 0 0 10 0 0 | 10
-----------+-------------------------------------------------------+----------
Total | 3 6 10 2 4 | 50
| _b[_cons]
_b[X_cum] | 17.04391 20.04064 23.79541 25.22751 30.72609 | Total
-----------+-------------------------------------------------------+----------
-.0397966 | 0 0 0 5 0 | 5
-.0318632 | 0 0 0 0 0 | 2
-.0028765 | 0 0 0 0 2 | 2
.0004337 | 0 0 0 0 0 | 3
.0037811 | 0 4 0 0 0 | 4
.070108 | 0 0 8 0 0 | 8
.0724891 | 0 0 0 0 0 | 4
.0991575 | 0 0 0 0 0 | 6
.1549924 | 6 0 0 0 0 | 6
.2500074 | 0 0 0 0 0 | 10
-----------+-------------------------------------------------------+----------
Total | 6 4 8 5 2 | 50
We can see (-.0318632, 14.69029) in the cross-tabulation table. The OLS estimation above is what the bootstrap using the bootstrap_check_1 ado file does. This was our error.
We now switch to use a modified ado file, bootstrap_check_2.
program bootstrap_check_2,rclass
version 16
tempname b V
capture drop X_cum
sort newid year
by newid: gen X_cum = sum(X)
reg Y X_cum
matrix `b' = e(b)
matrix `V' = e(V)
ereturn post `b' `V'
end
We replace ID with newid in this modified ado file, and we use this ado file to do a block bootstrap.
use "check_data.dta", clear
generate newid = ID
tsset newid year
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
bootstrap _b _se, rep(50) seed(123) cluster(ID) idcluster(newid) saving("check_code_2", replace) nowarn: bootstrap_check_2
Panel variable: newid (strongly balanced)
Time variable: year, 2009 to 2013
Delta: 1 unit
(running bootstrap_check_2 on estimation sample)
Bootstrap replications (50): .........10.........20.........30.........40.........50
> done
Bootstrap results Number of obs = 15
Replications = 50
(Replications based on 3 clusters in ID)
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
b |
X_cum | .2500074 .110787 2.26 0.024 .0328689 .4671459
_cons | 14.59429 5.524413 2.64 0.008 3.766643 25.42194
-------------+----------------------------------------------------------------
se |
X_cum | .1324635 .0477348 2.77 0.006 .0389049 .2260221
_cons | 3.695125 1.358591 2.72 0.007 1.032335 6.357914
------------------------------------------------------------------------------
OLS estimates in the bootstrap are
use "check_code_2", clear
tab _b_X _b_cons
(bootstrap: bootstrap_check_2)
| _b[_cons]
_b[X_cum] | 9.930254 10.63928 11.08247 14.44029 14.59429 | Total
-----------+-------------------------------------------------------+----------
-.0087411 | 0 0 0 0 0 | 2
.0012603 | 0 3 0 0 0 | 3
.0112229 | 0 0 0 0 0 | 4
.0706006 | 0 0 0 0 0 | 8
.0907742 | 0 0 0 0 0 | 5
.1278033 | 0 0 0 6 0 | 6
.156262 | 0 0 2 0 0 | 2
.2500074 | 0 0 0 0 10 | 10
.258613 | 0 0 0 0 0 | 6
.3537096 | 4 0 0 0 0 | 4
-----------+-------------------------------------------------------+----------
Total | 4 3 2 6 10 | 50
| _b[_cons]
_b[X_cum] | 17.0334 20.01127 21.29105 25.01602 30.76269 | Total
-----------+-------------------------------------------------------+----------
-.0087411 | 0 0 0 0 2 | 2
.0012603 | 0 0 0 0 0 | 3
.0112229 | 0 4 0 0 0 | 4
.0706006 | 0 0 0 8 0 | 8
.0907742 | 0 0 5 0 0 | 5
.1278033 | 0 0 0 0 0 | 6
.156262 | 0 0 0 0 0 | 2
.2500074 | 0 0 0 0 0 | 10
.258613 | 6 0 0 0 0 | 6
.3537096 | 0 0 0 0 0 | 4
-----------+-------------------------------------------------------+----------
Total | 6 4 5 8 2 | 50
We now have a different distribution of OLS estimates. To see how this ado file works, suppose that Stata picks ID=1, ID=1, and ID=2. To treat two ID=1 firms differently, we create newid and change ID of the first one to newid=4. In this case, our data are
use "check_data_ID_1.dta", clear
gen newid=4
append using "check_data_ID_1.dta"
replace newid=1 if newid==.
append using "check_data_ID_2.dta"
replace newid=2 if newid==.
list
(5 real changes made)
(5 real changes made)
+-----------------------------------------+
| ID year X Y newid |
|-----------------------------------------|
1. | 1 2009 3.96078 10.82663 4 |
2. | 1 2010 4.777452 10.68045 4 |
3. | 1 2011 5.253614 10.37472 4 |
4. | 1 2012 6.620269 10.52382 4 |
5. | 1 2013 7.22822 10.88551 4 |
|-----------------------------------------|
6. | 1 2009 3.96078 10.82663 1 |
7. | 1 2010 4.777452 10.68045 1 |
8. | 1 2011 5.253614 10.37472 1 |
9. | 1 2012 6.620269 10.52382 1 |
10. | 1 2013 7.22822 10.88551 1 |
|-----------------------------------------|
11. | 2 2009 6.293743 20.04308 2 |
12. | 2 2010 7.429042 20.04353 2 |
13. | 2 2011 8.782087 20.3393 2 |
14. | 2 2012 9.068334 20.67591 2 |
15. | 2 2013 10.97283 20.2636 2 |
+-----------------------------------------+
We apply the bootstrap_check_2 ado file to this data set. We first calculate a cumulative sum of X.
sort newid year
by newid: gen X_cum = sum(X)
list
| ID year X Y newid X_cum |
|----------------------------------------------------|
1. | 1 2009 3.96078 10.82663 1 3.96078 |
2. | 1 2010 4.777452 10.68045 1 8.738232 |
3. | 1 2011 5.253614 10.37472 1 13.99185 |
4. | 1 2012 6.620269 10.52382 1 20.61211 |
5. | 1 2013 7.22822 10.88551 1 27.84033 |
|----------------------------------------------------|
6. | 2 2009 6.293743 20.04308 2 6.293743 |
7. | 2 2010 7.429042 20.04353 2 13.72278 |
8. | 2 2011 8.782087 20.3393 2 22.50487 |
9. | 2 2012 9.068334 20.67591 2 31.57321 |
10. | 2 2013 10.97283 20.2636 2 42.54604 |
|----------------------------------------------------|
11. | 1 2009 3.96078 10.82663 4 3.96078 |
12. | 1 2010 4.777452 10.68045 4 8.738232 |
13. | 1 2011 5.253614 10.37472 4 13.99185 |
14. | 1 2012 6.620269 10.52382 4 20.61211 |
15. | 1 2013 7.22822 10.88551 4 27.84033 |
+----------------------------------------------------+
There are once again two ID=1 firms. However, they are treated as different firms because of newid. Using newid to sort observations leads to calculating a cumulative sum of X correctly. When we use this data set and run regression, we obtain
reg Y X_cum
Source | SS df MS Number of obs = 15
-------------+---------------------------------- F(1, 13) = 2.11
Model | 43.1447212 1 43.1447212 Prob > F = 0.1699
Residual | 265.637203 13 20.433631 R-squared = 0.1397
-------------+---------------------------------- Adj R-squared = 0.0736
Total | 308.781924 14 22.0558517 Root MSE = 4.5204
------------------------------------------------------------------------------
Y | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
X_cum | .156262 .1075381 1.45 0.170 -.0760599 .3885839
_cons | 11.08247 2.2415 4.94 0.000 6.240005 15.92494
------------------------------------------------------------------------------
To display OLS estimates in the bootstrap,
use "check_code_2", clear
tab _b_X _b_cons
(bootstrap: bootstrap_check_2)
| _b[_cons]
_b[X_cum] | 9.930254 10.63928 11.08247 14.44029 14.59429 | Total
-----------+-------------------------------------------------------+----------
-.0087411 | 0 0 0 0 0 | 2
.0012603 | 0 3 0 0 0 | 3
.0112229 | 0 0 0 0 0 | 4
.0706006 | 0 0 0 0 0 | 8
.0907742 | 0 0 0 0 0 | 5
.1278033 | 0 0 0 6 0 | 6
.156262 | 0 0 2 0 0 | 2
.2500074 | 0 0 0 0 10 | 10
.258613 | 0 0 0 0 0 | 6
.3537096 | 4 0 0 0 0 | 4
-----------+-------------------------------------------------------+----------
Total | 4 3 2 6 10 | 50
| _b[_cons]
_b[X_cum] | 17.0334 20.01127 21.29105 25.01602 30.76269 | Total
-----------+-------------------------------------------------------+----------
-.0087411 | 0 0 0 0 2 | 2
.0012603 | 0 0 0 0 0 | 3
.0112229 | 0 4 0 0 0 | 4
.0706006 | 0 0 0 8 0 | 8
.0907742 | 0 0 5 0 0 | 5
.1278033 | 0 0 0 0 0 | 6
.156262 | 0 0 0 0 0 | 2
.2500074 | 0 0 0 0 0 | 10
.258613 | 6 0 0 0 0 | 6
.3537096 | 0 0 0 0 0 | 4
-----------+-------------------------------------------------------+----------
Total | 6 4 5 8 2 | 50
We can see (.156262, 11.08247) in the cross-tabulation table. The OLS estimation above is what the bootstrap using the bootstrap_check_2 ado file does. This was indeed our intended estimation.
We first reproduce the estimation results published in the AER by using our data.
use "/Users/atsushiohyama/Desktop/bootstrap_checks/main_data_check.dta", clear
The ado file we use is as follows.
program boos_2sls_1_original, eclass
version 16
tempname b V
*tempvar num_exper_upgrades_st_hat
*tempvar num_exper_upgrades_st_cum_hat
capture drop num_exper_upgrades_st_hat num_exper_upgrades_st_cum_hat
poisson num_exper_upgrades_st c.sotan_c#c.dlog_high_end_cap fr_low_prod u_eng_dummy merchant_d ///
dlog_high_end_cap dlog_low_end_cap log_firm_total firm_age i.year_half_year if est_inc==1 , robust cluster(firmID)
predict num_exper_upgrades_st_hat if e(sample)
sort firmID year_half_year
by firmID: gen num_exper_upgrades_st_cum_hat=sum(num_exper_upgrades_st_hat)
reg dlog_firm_total num_exper_upgrades_st_cum_hat fr_low_prod u_eng_dummy merchant_d ///
dlog_high_end_cap dlog_low_end_cap log_firm_total firm_age i.year_half_year if est_inc==1
matrix `b' = e(b)
matrix `V' = e(V)
ereturn post `b' `V'
end
d
The following codes are to do a block bootstrap.
xtset, clear
quietly: xtset firmID
gen newid = firmID
quietly: tsset newid year_half_year
quietly: keep if est_inc
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_1_original
set rmsg off
r; t=0.00 16:02:47
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | .011584 .0074004 1.57 0.118 -.0029205 .0260885
fr_low_prod | -.0289046 .0274977 -1.05 0.293 -.0827991 .0249898
u_eng_dummy | .0640513 .0247989 2.58 0.010 .0154464 .1126563
merchant_d | .0253698 .0179867 1.41 0.158 -.0098835 .060623
dlog_high_end_cap | .0194187 .006803 2.85 0.004 .0060851 .0327522
dlog_low_end_cap | .0140216 .0163866 0.86 0.392 -.0180955 .0461388
log_firm_total | -.0297117 .0141636 -2.10 0.036 -.0574718 -.0019516
firm_age | -.0056414 .0018902 -2.98 0.003 -.0093461 -.0019367
|
year_half_year |
18932 | 0 (empty)
18941 | -.2317689 .1088958 -2.13 0.033 -.4452008 -.018337
18942 | -.1436358 .0836211 -1.72 0.086 -.3075302 .0202586
18951 | -.2202479 .0581322 -3.79 0.000 -.3341848 -.1063109
18952 | -.1707528 .0754805 -2.26 0.024 -.3186919 -.0228138
18961 | -.2633647 .0546604 -4.82 0.000 -.3704971 -.1562323
18962 | -.0503435 .084322 -0.60 0.550 -.2156116 .1149247
18971 | -.2351455 .0614537 -3.83 0.000 -.3555926 -.1146984
18972 | -.2469799 .0769312 -3.21 0.001 -.3977622 -.0961975
18981 | -.3053482 .0926905 -3.29 0.001 -.4870183 -.1236782
18982 | -.1615233 .0692322 -2.33 0.020 -.2972159 -.0258306
18991 | -.1003088 .0713606 -1.41 0.160 -.240173 .0395554
18992 | -.2652828 .0659644 -4.02 0.000 -.3945706 -.135995
19001 | -.649077 .0773658 -8.39 0.000 -.8007112 -.4974428
19002 | -.0583173 .0705391 -0.83 0.408 -.1965714 .0799369
19011 | -.1169698 .0665672 -1.76 0.079 -.247439 .0134994
19012 | -.0682318 .0683537 -1.00 0.318 -.2022027 .0657391
19021 | -.2446027 .0581234 -4.21 0.000 -.3585224 -.130683
19022 | -.1923108 .0705453 -2.73 0.006 -.3305771 -.0540445
19031 | -.2276858 .0637255 -3.57 0.000 -.3525854 -.1027861
19032 | -.496904 .1054649 -4.71 0.000 -.7036115 -.2901966
19041 | -.0445772 .0578241 -0.77 0.441 -.1579104 .068756
19042 | .148938 .1086669 1.37 0.171 -.0640452 .3619211
19051 | -.1532124 .0639916 -2.39 0.017 -.2786336 -.0277912
19052 | -.1231437 .0598776 -2.06 0.040 -.2405017 -.0057858
19061 | -.2099461 .0607615 -3.46 0.001 -.3290363 -.0908558
19062 | -.1155281 .0597175 -1.93 0.053 -.2325723 .001516
19071 | -.2254107 .0585909 -3.85 0.000 -.3402468 -.1105746
19072 | -.2584648 .0633395 -4.08 0.000 -.382608 -.1343217
19081 | -.2585993 .0635562 -4.07 0.000 -.3831671 -.1340316
19082 | -.0439159 .0624335 -0.70 0.482 -.1662832 .0784515
19091 | -.1905091 .0605747 -3.15 0.002 -.3092334 -.0717848
19092 | -.1563912 .0744314 -2.10 0.036 -.3022741 -.0105084
19101 | -.2239604 .0655147 -3.42 0.001 -.3523668 -.0955539
19102 | -.1076963 .0660421 -1.63 0.103 -.2371364 .0217439
19111 | -.1162379 .0640118 -1.82 0.069 -.2416986 .0092228
19112 | -.0372259 .0694718 -0.54 0.592 -.1733881 .0989364
19121 | -.0635743 .063682 -1.00 0.318 -.1883887 .0612401
19122 | -.1285104 .0644133 -2.00 0.046 -.2547583 -.0022626
19131 | -.1164261 .0651188 -1.79 0.074 -.2440566 .0112044
19132 | -.1193106 .0662039 -1.80 0.072 -.249068 .0104467
|
_cons | .5028145 .1221126 4.12 0.000 .2634783 .7421508
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0102924 .0023646 4.35 0.000 .0056579 .0149269
fr_low_prod | .0350792 .0049319 7.11 0.000 .0254128 .0447455
u_eng_dummy | .0210797 .0024999 8.43 0.000 .01618 .0259793
merchant_d | .016509 .0017065 9.67 0.000 .0131644 .0198536
dlog_high_end_cap | .0072844 .0011642 6.26 0.000 .0050026 .0095663
dlog_low_end_cap | .0133666 .0041805 3.20 0.001 .0051731 .0215601
log_firm_total | .0081239 .0008885 9.14 0.000 .0063823 .0098654
firm_age | .001716 .0001948 8.81 0.000 .0013342 .0020978
|
year_half_year |
18932 | 0 (empty)
18941 | .0734757 .0082471 8.91 0.000 .0573117 .0896398
18942 | .0733243 .0085884 8.54 0.000 .0564913 .0901573
18951 | .0715124 .0081103 8.82 0.000 .0556166 .0874083
18952 | .0704947 .0077621 9.08 0.000 .0552812 .0857082
18961 | .0701267 .0076053 9.22 0.000 .0552205 .0850328
18962 | .0681621 .0072943 9.34 0.000 .0538656 .0824586
18971 | .0673713 .0068561 9.83 0.000 .0539337 .080809
18972 | .0670389 .0067253 9.97 0.000 .0538575 .0802202
18981 | .0673623 .0066524 10.13 0.000 .0543238 .0804008
18982 | .0661455 .006619 9.99 0.000 .0531725 .0791185
18991 | .0672124 .0067041 10.03 0.000 .0540725 .0803522
18992 | .0670286 .0066696 10.05 0.000 .0539565 .0801007
19001 | .0668469 .0066543 10.05 0.000 .0538048 .0798891
19002 | .0661103 .0066482 9.94 0.000 .0530802 .0791405
19011 | .0662727 .0066808 9.92 0.000 .0531786 .0793668
19012 | .0665646 .0067018 9.93 0.000 .0534294 .0796998
19021 | .0690088 .0068489 10.08 0.000 .0555851 .0824324
19022 | .0702242 .0072762 9.65 0.000 .0559632 .0844853
19031 | .071554 .0074921 9.55 0.000 .0568696 .0862383
19032 | .0710545 .0073121 9.72 0.000 .0567231 .0853859
19041 | .0705163 .0072906 9.67 0.000 .056227 .0848056
19042 | .0703472 .0072227 9.74 0.000 .0561911 .0845034
19051 | .0710427 .0070885 10.02 0.000 .0571495 .0849358
19052 | .0703586 .0069957 10.06 0.000 .0566473 .0840698
19061 | .0717094 .0071691 10.00 0.000 .0576583 .0857605
19062 | .0745955 .0076345 9.77 0.000 .0596322 .0895589
19071 | .075216 .007734 9.73 0.000 .0600577 .0903743
19072 | .0752294 .0077201 9.74 0.000 .0600982 .0903606
19081 | .0764528 .0079465 9.62 0.000 .060878 .0920276
19082 | .0762798 .0079304 9.62 0.000 .0607365 .0918232
19091 | .0770842 .0083807 9.20 0.000 .0606582 .0935101
19092 | .077142 .0083862 9.20 0.000 .0607052 .0935787
19101 | .0766161 .0082918 9.24 0.000 .0603644 .0928677
19102 | .07771 .0085966 9.04 0.000 .060861 .094559
19111 | .0787629 .0087326 9.02 0.000 .0616474 .0958784
19112 | .0814798 .0092549 8.80 0.000 .0633405 .0996191
19121 | .0807194 .0089771 8.99 0.000 .0631246 .0983143
19122 | .0797725 .0087639 9.10 0.000 .0625955 .0969494
19131 | .0794702 .0085784 9.26 0.000 .0626569 .0962835
19132 | .0801005 .0085179 9.40 0.000 .0634058 .0967952
|
_cons | .0813876 .0076767 10.60 0.000 .0663415 .0964337
------------------------------------------------------------------------------------
r; t=453.49 16:10:20
The same estimation results are reproduced.
The ado file we use is as follows.
program boos_2sls_2_original, eclass
version 16
tempname b V
capture drop num_exper_upgrades_st_hat num_exper_upgrades_st_cum_hat upgrade_exper_low_hat
poisson num_exper_upgrades_st c.sotan_c#c.dlog_high_end_cap fr_low_prod u_eng_dummy merchant_d ///
dlog_high_end_cap dlog_low_end_cap log_firm_total firm_age i.year_half_year if est_inc==1 , robust cluster(firmID)
predict num_exper_upgrades_st_hat if e(sample)
sort firmID year_half_year
by firmID: gen num_exper_upgrades_st_cum_hat=sum(num_exper_upgrades_st_hat)
gen upgrade_exper_low_hat = num_exper_upgrades_st_cum_hat*fr_low_prod
reg dlog_firm_total num_exper_upgrades_st_cum_hat fr_low_prod upgrade_exper_low_hat u_eng_dummy merchant_d dlog_high_end_cap dlog_low_end_cap ///
log_firm_total firm_age i.year_half_year if est_inc==1
matrix `b' = e(b)
matrix `V' = e(V)
ereturn post `b' `V'
end
The following codes are to do a block bootstrap.
drop num_exper_upgrades_st_hat num_exper_upgrades_st_cum_hat
cap drop newid
xtset, clear
quietly:xtset firmID
gen newid = firmID
quietly:tsset newid year_half_year
quietly:keep if est_inc
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_2_original
set rmsg off
r; t=0.00 16:24:32
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | -.0136359 .0087412 -1.56 0.119 -.0307683 .0034965
fr_low_prod | -.0804099 .0338987 -2.37 0.018 -.1468501 -.0139696
upgrade_exper_lo~t | .081418 .0197699 4.12 0.000 .0426697 .1201663
u_eng_dummy | .0709999 .0253241 2.80 0.005 .0213656 .1206341
merchant_d | .0218151 .0189839 1.15 0.251 -.0153927 .0590229
dlog_high_end_cap | .0187246 .0070012 2.67 0.007 .0050024 .0324467
dlog_low_end_cap | .0118077 .0162206 0.73 0.467 -.0199841 .0435995
log_firm_total | -.0458702 .0153819 -2.98 0.003 -.0760181 -.0157222
firm_age | -.0089447 .002102 -4.26 0.000 -.0130645 -.0048249
|
year_half_year |
18932 | 0 (empty)
18941 | -.2315487 .1090091 -2.12 0.034 -.4452026 -.0178947
18942 | -.1509977 .0819321 -1.84 0.065 -.3115817 .0095864
18951 | -.2264304 .0570758 -3.97 0.000 -.3382968 -.114564
18952 | -.179645 .0743596 -2.42 0.016 -.325387 -.0339029
18961 | -.2694846 .0529201 -5.09 0.000 -.373206 -.1657632
18962 | -.0559701 .0835881 -0.67 0.503 -.2197999 .1078596
18971 | -.2358472 .0600893 -3.92 0.000 -.3536202 -.1180743
18972 | -.2513013 .0758327 -3.31 0.001 -.3999307 -.1026719
18981 | -.3068619 .0920105 -3.34 0.001 -.4871991 -.1265247
18982 | -.1646867 .0688441 -2.39 0.017 -.2996187 -.0297546
18991 | -.098971 .0701112 -1.41 0.158 -.2363863 .0384444
18992 | -.2624017 .0649904 -4.04 0.000 -.3897804 -.1350229
19001 | -.6421264 .0768054 -8.36 0.000 -.7926622 -.4915906
19002 | -.0607489 .0695333 -0.87 0.382 -.1970316 .0755339
19011 | -.1136716 .0655635 -1.73 0.083 -.2421737 .0148304
19012 | -.0648759 .0674915 -0.96 0.336 -.1971568 .067405
19021 | -.2349313 .0576239 -4.08 0.000 -.347872 -.1219905
19022 | -.1831559 .0707698 -2.59 0.010 -.3218621 -.0444497
19031 | -.2171855 .0638983 -3.40 0.001 -.3424238 -.0919472
19032 | -.4896982 .1049375 -4.67 0.000 -.695372 -.2840245
19041 | -.0418287 .0578407 -0.72 0.470 -.1551945 .071537
19042 | .1523369 .1080407 1.41 0.159 -.059419 .3640928
19051 | -.1411425 .0642063 -2.20 0.028 -.2669846 -.0153005
19052 | -.1094506 .0601442 -1.82 0.069 -.2273311 .00843
19061 | -.1917889 .0603472 -3.18 0.001 -.3100673 -.0735105
19062 | -.0970968 .0593456 -1.64 0.102 -.213412 .0192184
19071 | -.2046371 .0583906 -3.50 0.000 -.3190806 -.0901936
19072 | -.2377659 .063074 -3.77 0.000 -.3613886 -.1141431
19081 | -.2402924 .0629556 -3.82 0.000 -.3636832 -.1169016
19082 | -.028004 .0617743 -0.45 0.650 -.1490794 .0930714
19091 | -.1711682 .060882 -2.81 0.005 -.2904948 -.0518416
19092 | -.141601 .0736876 -1.92 0.055 -.2860262 .0028241
19101 | -.2078389 .0656235 -3.17 0.002 -.3364585 -.0792192
19102 | -.0954905 .0655307 -1.46 0.145 -.2239283 .0329473
19111 | -.0968287 .0646594 -1.50 0.134 -.2235588 .0299015
19112 | -.0166007 .0697452 -0.24 0.812 -.1532987 .1200973
19121 | -.0365185 .0649846 -0.56 0.574 -.163886 .090849
19122 | -.099508 .0660866 -1.51 0.132 -.2290354 .0300193
19131 | -.0824395 .0668156 -1.23 0.217 -.2133957 .0485166
19132 | -.0818231 .0679207 -1.20 0.228 -.2149452 .0512991
|
_cons | .6813047 .1364541 4.99 0.000 .4138596 .9487499
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0123694 .0047561 2.60 0.009 .0030476 .0216911
fr_low_prod | .0376921 .0062059 6.07 0.000 .0255288 .0498554
upgrade_exper_lo~t | .0223423 .0064298 3.47 0.001 .0097402 .0349444
u_eng_dummy | .0210835 .0025112 8.40 0.000 .0161617 .0260053
merchant_d | .0164733 .001711 9.63 0.000 .0131198 .0198267
dlog_high_end_cap | .0072584 .0011591 6.26 0.000 .0049865 .0095303
dlog_low_end_cap | .0133281 .0041748 3.19 0.001 .0051458 .0215105
log_firm_total | .0092273 .0009792 9.42 0.000 .007308 .0111465
firm_age | .0019348 .0002109 9.17 0.000 .0015214 .0023481
|
year_half_year |
18932 | 0 (empty)
18941 | .0731881 .0082139 8.91 0.000 .0570891 .0892871
18942 | .0730652 .0085599 8.54 0.000 .0562882 .0898422
18951 | .0712527 .0080819 8.82 0.000 .0554124 .0870929
18952 | .0702611 .0077366 9.08 0.000 .0550976 .0854246
18961 | .0698723 .0075797 9.22 0.000 .0550163 .0847283
18962 | .0679128 .0072679 9.34 0.000 .053668 .0821577
18971 | .0671078 .0068271 9.83 0.000 .0537271 .0804886
18972 | .0667869 .0067011 9.97 0.000 .0536531 .0799208
18981 | .0670998 .0066254 10.13 0.000 .0541142 .0800855
18982 | .0658923 .0065927 9.99 0.000 .0529708 .0788138
18991 | .0669502 .0066785 10.02 0.000 .0538607 .0800398
18992 | .0667709 .0066441 10.05 0.000 .0537486 .0797932
19001 | .0666125 .0066288 10.05 0.000 .0536203 .0796048
19002 | .0658549 .0066228 9.94 0.000 .0528745 .0788353
19011 | .0660194 .0066548 9.92 0.000 .0529761 .0790626
19012 | .0663104 .0066754 9.93 0.000 .0532269 .0793939
19021 | .0687898 .0068287 10.07 0.000 .0554057 .0821739
19022 | .0699944 .0072536 9.65 0.000 .0557776 .0842111
19031 | .071332 .0074687 9.55 0.000 .0566937 .0859704
19032 | .0708039 .0072865 9.72 0.000 .0565227 .0850852
19041 | .0702443 .0072652 9.67 0.000 .0560047 .0844839
19042 | .070078 .0071979 9.74 0.000 .0559704 .0841856
19051 | .070842 .0070632 10.03 0.000 .0569984 .0846856
19052 | .0701838 .0069713 10.07 0.000 .0565202 .0838473
19061 | .0716022 .0071458 10.02 0.000 .0575966 .0856078
19062 | .0744754 .0076107 9.79 0.000 .0595587 .0893922
19071 | .0751381 .0077052 9.75 0.000 .0600362 .09024
19072 | .0751498 .0076866 9.78 0.000 .0600844 .0902153
19081 | .076319 .007911 9.65 0.000 .0608138 .0918242
19082 | .0761066 .0078995 9.63 0.000 .0606238 .0915893
19091 | .0769656 .008351 9.22 0.000 .0605978 .0933333
19092 | .076947 .0083608 9.20 0.000 .0605602 .0933339
19101 | .0764442 .0082618 9.25 0.000 .0602515 .092637
19102 | .0774782 .0085649 9.05 0.000 .0606913 .0942651
19111 | .0786351 .0086977 9.04 0.000 .061588 .0956822
19112 | .0813579 .0092231 8.82 0.000 .0632809 .099435
19121 | .0807455 .0089422 9.03 0.000 .0632191 .0982719
19122 | .0798577 .0087262 9.15 0.000 .0627547 .0969607
19131 | .0797066 .0085406 9.33 0.000 .0629674 .0964458
19132 | .0804473 .0084865 9.48 0.000 .0638141 .0970805
|
_cons | .0947167 .0089509 10.58 0.000 .0771732 .1122601
------------------------------------------------------------------------------------
r; t=467.38 16:32:19
The same estimation results are reproduced.
We use the corrected ado file. In the corrected file, firmID is replaced by newid.
program boos_2sls_1_modified, eclass
version 16
tempname b V
*tempvar num_exper_upgrades_st_hat
*tempvar num_exper_upgrades_st_cum_hat
capture drop num_exper_upgrades_st_hat num_exper_upgrades_st_cum_hat
poisson num_exper_upgrades_st c.sotan_c#c.dlog_high_end_cap fr_low_prod u_eng_dummy merchant_d ///
dlog_high_end_cap dlog_low_end_cap log_firm_total firm_age i.year_half_year if est_inc==1 , robust cluster(firmID)
predict num_exper_upgrades_st_hat if e(sample)
sort newid year_half_year
by newid: gen num_exper_upgrades_st_cum_hat=sum(num_exper_upgrades_st_hat)
reg dlog_firm_total num_exper_upgrades_st_cum_hat fr_low_prod u_eng_dummy merchant_d ///
dlog_high_end_cap dlog_low_end_cap log_firm_total firm_age i.year_half_year if est_inc==1
matrix `b' = e(b)
matrix `V' = e(V)
ereturn post `b' `V'
end
d
The following codes are to do a block bootstrap using the corrected ado file.
cap drop newid
xtset, clear
quietly:xtset firmID
gen newid = firmID
quietly:tsset newid year_half_year
quietly:keep if est_inc
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_1_modified
set rmsg off
r; t=0.00 17:00:35
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | .011584 .0115483 1.00 0.316 -.0110503 .0342182
fr_low_prod | -.0289046 .0284083 -1.02 0.309 -.0845838 .0267745
u_eng_dummy | .0640513 .0249542 2.57 0.010 .015142 .1129606
merchant_d | .0253698 .0182248 1.39 0.164 -.0103501 .0610896
dlog_high_end_cap | .0194187 .0067558 2.87 0.004 .0061775 .0326598
dlog_low_end_cap | .0140216 .016539 0.85 0.397 -.0183941 .0464374
log_firm_total | -.0297117 .0150901 -1.97 0.049 -.0592877 -.0001357
firm_age | -.0056414 .0020315 -2.78 0.005 -.009623 -.0016598
|
year_half_year |
18932 | 0 (empty)
18941 | -.2317689 .1090228 -2.13 0.034 -.4454497 -.0180882
18942 | -.1436358 .0838155 -1.71 0.087 -.3079111 .0206395
18951 | -.2202479 .0584364 -3.77 0.000 -.3347811 -.1057146
18952 | -.1707528 .0757536 -2.25 0.024 -.3192272 -.0222785
18961 | -.2633647 .0548826 -4.80 0.000 -.3709326 -.1557967
18962 | -.0503435 .0843317 -0.60 0.551 -.2156306 .1149437
18971 | -.2351455 .0616137 -3.82 0.000 -.3559062 -.1143848
18972 | -.2469799 .0769269 -3.21 0.001 -.3977539 -.0962058
18981 | -.3053482 .0928834 -3.29 0.001 -.4873963 -.1233002
18982 | -.1615233 .0693215 -2.33 0.020 -.2973909 -.0256556
18991 | -.1003088 .0715964 -1.40 0.161 -.2406351 .0400176
18992 | -.2652828 .0660639 -4.02 0.000 -.3947657 -.1357999
19001 | -.649077 .077672 -8.36 0.000 -.8013113 -.4968427
19002 | -.0583173 .0707663 -0.82 0.410 -.1970167 .0803822
19011 | -.1169698 .0667382 -1.75 0.080 -.2477743 .0138347
19012 | -.0682318 .068608 -0.99 0.320 -.202701 .0662374
19021 | -.2446027 .058215 -4.20 0.000 -.3587019 -.1305034
19022 | -.1923108 .0705746 -2.72 0.006 -.3306344 -.0539871
19031 | -.2276858 .0638652 -3.57 0.000 -.3528592 -.1025124
19032 | -.496904 .1053347 -4.72 0.000 -.7033563 -.2904517
19041 | -.0445772 .0579341 -0.77 0.442 -.158126 .0689716
19042 | .148938 .1085848 1.37 0.170 -.0638843 .3617602
19051 | -.1532124 .0639811 -2.39 0.017 -.278613 -.0278117
19052 | -.1231437 .0600201 -2.05 0.040 -.240781 -.0055064
19061 | -.2099461 .060778 -3.45 0.001 -.3290687 -.0908234
19062 | -.1155281 .0599645 -1.93 0.054 -.2330563 .002
19071 | -.2254107 .058705 -3.84 0.000 -.3404704 -.110351
19072 | -.2584648 .0637141 -4.06 0.000 -.3833423 -.1335874
19081 | -.2585993 .0636831 -4.06 0.000 -.3834159 -.1337828
19082 | -.0439159 .0624821 -0.70 0.482 -.1663786 .0785468
19091 | -.1905091 .0605654 -3.15 0.002 -.3092151 -.0718032
19092 | -.1563912 .0748209 -2.09 0.037 -.3030375 -.0097449
19101 | -.2239604 .0658515 -3.40 0.001 -.3530269 -.0948938
19102 | -.1076963 .0667224 -1.61 0.107 -.2384697 .0230772
19111 | -.1162379 .0643589 -1.81 0.071 -.2423791 .0099033
19112 | -.0372259 .0697381 -0.53 0.593 -.1739101 .0994584
19121 | -.0635743 .0637459 -1.00 0.319 -.1885139 .0613653
19122 | -.1285104 .0642467 -2.00 0.045 -.2544316 -.0025892
19131 | -.1164261 .0652337 -1.78 0.074 -.2442819 .0114296
19132 | -.1193106 .0658581 -1.81 0.070 -.2483901 .0097688
|
_cons | .5028145 .1261369 3.99 0.000 .2555908 .7500383
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0102924 .0026386 3.90 0.000 .0051209 .0154639
fr_low_prod | .0350792 .0052512 6.68 0.000 .0247869 .0453714
u_eng_dummy | .0210797 .0024966 8.44 0.000 .0161863 .025973
merchant_d | .016509 .0016832 9.81 0.000 .0132099 .019808
dlog_high_end_cap | .0072844 .0011647 6.25 0.000 .0050016 .0095672
dlog_low_end_cap | .0133666 .0041829 3.20 0.001 .0051683 .0215649
log_firm_total | .0081239 .0009311 8.73 0.000 .006299 .0099487
firm_age | .001716 .0002068 8.30 0.000 .0013107 .0021213
|
year_half_year |
18932 | 0 (empty)
18941 | .0734757 .0082405 8.92 0.000 .0573245 .0896269
18942 | .0733243 .0085833 8.54 0.000 .0565013 .0901474
18951 | .0715124 .0081062 8.82 0.000 .0556245 .0874004
18952 | .0704947 .0077577 9.09 0.000 .05529 .0856995
18961 | .0701267 .0076001 9.23 0.000 .0552307 .0850226
18962 | .0681621 .0072897 9.35 0.000 .0538746 .0824496
18971 | .0673713 .0068513 9.83 0.000 .053943 .0807997
18972 | .0670389 .0067211 9.97 0.000 .0538658 .0802119
18981 | .0673623 .0066486 10.13 0.000 .0543313 .0803933
18982 | .0661455 .0066159 10.00 0.000 .0531787 .0791124
18991 | .0672124 .0067014 10.03 0.000 .0540778 .0803469
18992 | .0670286 .0066669 10.05 0.000 .0539617 .0800955
19001 | .0668469 .006653 10.05 0.000 .0538072 .0798866
19002 | .0661103 .006645 9.95 0.000 .0530864 .0791343
19011 | .0662727 .00668 9.92 0.000 .0531802 .0793651
19012 | .0665646 .0066996 9.94 0.000 .0534337 .0796955
19021 | .0690088 .0068489 10.08 0.000 .0555852 .0824324
19022 | .0702242 .0072736 9.65 0.000 .0559683 .0844802
19031 | .071554 .0074895 9.55 0.000 .0568748 .0862331
19032 | .0710545 .0073078 9.72 0.000 .0567314 .0853776
19041 | .0705163 .0072858 9.68 0.000 .0562364 .0847963
19042 | .0703472 .0072178 9.75 0.000 .0562005 .0844939
19051 | .0710427 .0070847 10.03 0.000 .0571569 .0849285
19052 | .0703586 .006992 10.06 0.000 .0566545 .0840626
19061 | .0717094 .007165 10.01 0.000 .0576663 .0857525
19062 | .0745955 .0076286 9.78 0.000 .0596437 .0895473
19071 | .075216 .0077298 9.73 0.000 .0600658 .0903662
19072 | .0752294 .0077164 9.75 0.000 .0601055 .0903533
19081 | .0764528 .0079403 9.63 0.000 .0608901 .0920155
19082 | .0762798 .0079241 9.63 0.000 .0607489 .0918108
19091 | .0770842 .0083698 9.21 0.000 .0606797 .0934886
19092 | .077142 .0083779 9.21 0.000 .0607215 .0935624
19101 | .0766161 .0082852 9.25 0.000 .0603775 .0928547
19102 | .07771 .0085889 9.05 0.000 .0608761 .0945438
19111 | .0787629 .0087238 9.03 0.000 .0616646 .0958612
19112 | .0814798 .0092431 8.82 0.000 .0633636 .099596
19121 | .0807194 .0089631 9.01 0.000 .063152 .0982868
19122 | .0797725 .0087554 9.11 0.000 .0626123 .0969326
19131 | .0794702 .0085687 9.27 0.000 .0626759 .0962645
19132 | .0801005 .0085059 9.42 0.000 .0634293 .0967717
|
_cons | .0813876 .0078062 10.43 0.000 .0660877 .0966875
------------------------------------------------------------------------------------
r; t=458.85 17:08:14
The corrected ado file is as follows.
program boos_2sls_2_modified, eclass
version 16
tempname b V
capture drop num_exper_upgrades_st_hat num_exper_upgrades_st_cum_hat upgrade_exper_low_hat
poisson num_exper_upgrades_st c.sotan_c#c.dlog_high_end_cap fr_low_prod u_eng_dummy merchant_d ///
dlog_high_end_cap dlog_low_end_cap log_firm_total firm_age i.year_half_year if est_inc==1 , robust cluster(firmID)
predict num_exper_upgrades_st_hat if e(sample)
sort newid year_half_year
by newid: gen num_exper_upgrades_st_cum_hat=sum(num_exper_upgrades_st_hat)
gen upgrade_exper_low_hat = num_exper_upgrades_st_cum_hat*fr_low_prod
reg dlog_firm_total num_exper_upgrades_st_cum_hat fr_low_prod upgrade_exper_low_hat u_eng_dummy merchant_d dlog_high_end_cap dlog_low_end_cap ///
log_firm_total firm_age i.year_half_year if est_inc==1
matrix `b' = e(b)
matrix `V' = e(V)
ereturn post `b' `V'
end
The following codes are to do a block bootstrap using the corrected ado file.
drop num_exper_upgrades_st_hat num_exper_upgrades_st_cum_hat upgrade_exper_low_hat
cap drop newid
xtset, clear
quietly:xtset firmID
gen newid = firmID
quietly:tsset newid year_half_year
quietly:keep if est_inc
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_2_modified
set rmsg off
r; t=0.00 17:50:31
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | -.0136359 .013527 -1.01 0.313 -.0401483 .0128765
fr_low_prod | -.0804099 .0352664 -2.28 0.023 -.1495306 -.0112891
upgrade_exper_lo~t | .081418 .0340635 2.39 0.017 .0146548 .1481812
u_eng_dummy | .0709999 .0266415 2.67 0.008 .0187834 .1232163
merchant_d | .0218151 .019978 1.09 0.275 -.0173411 .0609712
dlog_high_end_cap | .0187246 .006934 2.70 0.007 .0051343 .0323149
dlog_low_end_cap | .0118077 .0160006 0.74 0.461 -.019553 .0431683
log_firm_total | -.0458702 .0182134 -2.52 0.012 -.0815677 -.0101726
firm_age | -.0089447 .002656 -3.37 0.001 -.0141504 -.003739
|
year_half_year |
18932 | 0 (empty)
18941 | -.2315487 .1092369 -2.12 0.034 -.4456491 -.0174483
18942 | -.1509977 .0820268 -1.84 0.066 -.3117673 .009772
18951 | -.2264304 .0577743 -3.92 0.000 -.339666 -.1131948
18952 | -.179645 .0744597 -2.41 0.016 -.3255834 -.0337066
18961 | -.2694846 .053507 -5.04 0.000 -.3743564 -.1646128
18962 | -.0559701 .0834335 -0.67 0.502 -.2194969 .1075566
18971 | -.2358472 .0603963 -3.90 0.000 -.3542218 -.1174727
18972 | -.2513013 .0757621 -3.32 0.001 -.3997923 -.1028103
18981 | -.3068619 .0924291 -3.32 0.001 -.4880197 -.1257041
18982 | -.1646867 .0689877 -2.39 0.017 -.2999 -.0294733
18991 | -.098971 .0703185 -1.41 0.159 -.2367927 .0388508
18992 | -.2624017 .0649865 -4.04 0.000 -.3897729 -.1350305
19001 | -.6421264 .0773704 -8.30 0.000 -.7937695 -.4904833
19002 | -.0607489 .070182 -0.87 0.387 -.1983031 .0768054
19011 | -.1136716 .0658935 -1.73 0.085 -.2428204 .0154771
19012 | -.0648759 .0679492 -0.95 0.340 -.1980539 .068302
19021 | -.2349313 .0580572 -4.05 0.000 -.3487213 -.1211412
19022 | -.1831559 .0713461 -2.57 0.010 -.3229918 -.0433201
19031 | -.2171855 .0642965 -3.38 0.001 -.3432044 -.0911667
19032 | -.4896982 .1043097 -4.69 0.000 -.6941415 -.2852549
19041 | -.0418287 .0582154 -0.72 0.472 -.1559288 .0722714
19042 | .1523369 .1076383 1.42 0.157 -.0586303 .3633041
19051 | -.1411425 .0644141 -2.19 0.028 -.2673918 -.0148933
19052 | -.1094506 .0607772 -1.80 0.072 -.2285718 .0096706
19061 | -.1917889 .0611768 -3.13 0.002 -.3116933 -.0718845
19062 | -.0970968 .0607212 -1.60 0.110 -.2161082 .0219146
19071 | -.2046371 .0598543 -3.42 0.001 -.3219494 -.0873249
19072 | -.2377659 .0646629 -3.68 0.000 -.3645028 -.1110289
19081 | -.2402924 .0641145 -3.75 0.000 -.3659546 -.1146302
19082 | -.028004 .0619641 -0.45 0.651 -.1494513 .0934434
19091 | -.1711682 .061139 -2.80 0.005 -.2909985 -.0513379
19092 | -.141601 .0745523 -1.90 0.058 -.2877209 .0045189
19101 | -.2078389 .0671255 -3.10 0.002 -.3394024 -.0762753
19102 | -.0954905 .0665397 -1.44 0.151 -.225906 .034925
19111 | -.0968287 .0662731 -1.46 0.144 -.2267215 .0330641
19112 | -.0166007 .0715186 -0.23 0.816 -.1567745 .1235732
19121 | -.0365185 .0670752 -0.54 0.586 -.1679834 .0949464
19122 | -.099508 .0671677 -1.48 0.138 -.2311543 .0321382
19131 | -.0824395 .0690757 -1.19 0.233 -.2178255 .0529464
19132 | -.0818231 .0698396 -1.17 0.241 -.2187063 .0550601
|
_cons | .6813047 .1582127 4.31 0.000 .3712135 .991396
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0123694 .0063982 1.93 0.053 -.000171 .0249097
fr_low_prod | .0376921 .0060403 6.24 0.000 .0258534 .0495308
upgrade_exper_lo~t | .0223423 .0092527 2.41 0.016 .0042073 .0404773
u_eng_dummy | .0210835 .0025002 8.43 0.000 .0161833 .0259838
merchant_d | .0164733 .0016729 9.85 0.000 .0131944 .0197521
dlog_high_end_cap | .0072584 .0011597 6.26 0.000 .0049855 .0095313
dlog_low_end_cap | .0133281 .0041717 3.19 0.001 .0051518 .0215045
log_firm_total | .0092273 .0010669 8.65 0.000 .0071362 .0113184
firm_age | .0019348 .0002394 8.08 0.000 .0014656 .0024039
|
year_half_year |
18932 | 0 (empty)
18941 | .0731881 .0081864 8.94 0.000 .0571429 .0892332
18942 | .0730652 .0085341 8.56 0.000 .0563386 .0897918
18951 | .0712527 .0080583 8.84 0.000 .0554588 .0870465
18952 | .0702611 .0077128 9.11 0.000 .0551443 .085378
18961 | .0698723 .0075546 9.25 0.000 .0550655 .0846791
18962 | .0679128 .007244 9.38 0.000 .0537149 .0821107
18971 | .0671078 .0068042 9.86 0.000 .053772 .0804437
18972 | .0667869 .0066798 10.00 0.000 .0536947 .0798792
18981 | .0670998 .0066067 10.16 0.000 .0541509 .0800488
18982 | .0658923 .0065766 10.02 0.000 .0530023 .0787823
18991 | .0669502 .0066612 10.05 0.000 .0538945 .0800059
18992 | .0667709 .0066267 10.08 0.000 .0537827 .0797591
19001 | .0666125 .0066144 10.07 0.000 .0536486 .0795765
19002 | .0658549 .0066065 9.97 0.000 .0529064 .0788034
19011 | .0660194 .006641 9.94 0.000 .0530034 .0790354
19012 | .0663104 .0066592 9.96 0.000 .0532586 .0793621
19021 | .0687898 .0068146 10.09 0.000 .0554334 .0821462
19022 | .0699944 .0072379 9.67 0.000 .0558084 .0841803
19031 | .071332 .007452 9.57 0.000 .0567264 .0859377
19032 | .0708039 .0072708 9.74 0.000 .0565534 .0850545
19041 | .0702443 .0072499 9.69 0.000 .0560347 .0844538
19042 | .070078 .0071817 9.76 0.000 .056002 .0841539
19051 | .070842 .0070477 10.05 0.000 .0570288 .0846552
19052 | .0701838 .0069518 10.10 0.000 .0565586 .083809
19061 | .0716022 .0071259 10.05 0.000 .0576358 .0855687
19062 | .0744754 .0075888 9.81 0.000 .0596017 .0893491
19071 | .0751381 .0076813 9.78 0.000 .060083 .0901932
19072 | .0751498 .0076653 9.80 0.000 .0601261 .0901736
19081 | .076319 .0078871 9.68 0.000 .0608605 .0917775
19082 | .0761066 .0078767 9.66 0.000 .0606684 .0915447
19091 | .0769656 .0083193 9.25 0.000 .06066 .0932711
19092 | .076947 .0083305 9.24 0.000 .0606195 .0932746
19101 | .0764442 .0082333 9.28 0.000 .0603073 .0925812
19102 | .0774782 .0085371 9.08 0.000 .0607457 .0942106
19111 | .0786351 .0086645 9.08 0.000 .061653 .0956172
19112 | .0813579 .009187 8.86 0.000 .0633517 .0993641
19121 | .0807455 .0089034 9.07 0.000 .063295 .0981959
19122 | .0798577 .008695 9.18 0.000 .0628157 .0968997
19131 | .0797066 .0085051 9.37 0.000 .0630369 .0963763
19132 | .0804473 .0084515 9.52 0.000 .0638826 .097012
|
_cons | .0947167 .0090575 10.46 0.000 .0769643 .1124691
------------------------------------------------------------------------------------
r; t=525.66 17:59:17
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_1_original
set rmsg off
r; t=0.00 18:29:09
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | .011584 .0074004 1.57 0.118 -.0029205 .0260885
fr_low_prod | -.0289046 .0274977 -1.05 0.293 -.0827991 .0249898
u_eng_dummy | .0640513 .0247989 2.58 0.010 .0154464 .1126563
merchant_d | .0253698 .0179867 1.41 0.158 -.0098835 .060623
dlog_high_end_cap | .0194187 .006803 2.85 0.004 .0060851 .0327522
dlog_low_end_cap | .0140216 .0163866 0.86 0.392 -.0180955 .0461388
log_firm_total | -.0297117 .0141636 -2.10 0.036 -.0574718 -.0019516
firm_age | -.0056414 .0018902 -2.98 0.003 -.0093461 -.0019367
|
year_half_year |
18932 | 0 (empty)
18941 | -.2317689 .1088958 -2.13 0.033 -.4452008 -.018337
18942 | -.1436358 .0836211 -1.72 0.086 -.3075302 .0202586
18951 | -.2202479 .0581322 -3.79 0.000 -.3341848 -.1063109
18952 | -.1707528 .0754805 -2.26 0.024 -.3186919 -.0228138
18961 | -.2633647 .0546604 -4.82 0.000 -.3704971 -.1562323
18962 | -.0503435 .084322 -0.60 0.550 -.2156116 .1149247
18971 | -.2351455 .0614537 -3.83 0.000 -.3555926 -.1146984
18972 | -.2469799 .0769312 -3.21 0.001 -.3977622 -.0961975
18981 | -.3053482 .0926905 -3.29 0.001 -.4870183 -.1236782
18982 | -.1615233 .0692322 -2.33 0.020 -.2972159 -.0258306
18991 | -.1003088 .0713606 -1.41 0.160 -.240173 .0395554
18992 | -.2652828 .0659644 -4.02 0.000 -.3945706 -.135995
19001 | -.649077 .0773658 -8.39 0.000 -.8007112 -.4974428
19002 | -.0583173 .0705391 -0.83 0.408 -.1965714 .0799369
19011 | -.1169698 .0665672 -1.76 0.079 -.247439 .0134994
19012 | -.0682318 .0683537 -1.00 0.318 -.2022027 .0657391
19021 | -.2446027 .0581234 -4.21 0.000 -.3585224 -.130683
19022 | -.1923108 .0705453 -2.73 0.006 -.3305771 -.0540445
19031 | -.2276858 .0637255 -3.57 0.000 -.3525854 -.1027861
19032 | -.496904 .1054649 -4.71 0.000 -.7036115 -.2901966
19041 | -.0445772 .0578241 -0.77 0.441 -.1579104 .068756
19042 | .148938 .1086669 1.37 0.171 -.0640452 .3619211
19051 | -.1532124 .0639916 -2.39 0.017 -.2786336 -.0277912
19052 | -.1231437 .0598776 -2.06 0.040 -.2405017 -.0057858
19061 | -.2099461 .0607615 -3.46 0.001 -.3290363 -.0908558
19062 | -.1155281 .0597175 -1.93 0.053 -.2325723 .001516
19071 | -.2254107 .0585909 -3.85 0.000 -.3402468 -.1105746
19072 | -.2584648 .0633395 -4.08 0.000 -.382608 -.1343217
19081 | -.2585993 .0635562 -4.07 0.000 -.3831671 -.1340316
19082 | -.0439159 .0624335 -0.70 0.482 -.1662832 .0784515
19091 | -.1905091 .0605747 -3.15 0.002 -.3092334 -.0717848
19092 | -.1563912 .0744314 -2.10 0.036 -.3022741 -.0105084
19101 | -.2239604 .0655147 -3.42 0.001 -.3523668 -.0955539
19102 | -.1076963 .0660421 -1.63 0.103 -.2371364 .0217439
19111 | -.1162379 .0640118 -1.82 0.069 -.2416986 .0092228
19112 | -.0372259 .0694718 -0.54 0.592 -.1733881 .0989364
19121 | -.0635743 .063682 -1.00 0.318 -.1883887 .0612401
19122 | -.1285104 .0644133 -2.00 0.046 -.2547583 -.0022626
19131 | -.1164261 .0651188 -1.79 0.074 -.2440566 .0112044
19132 | -.1193106 .0662039 -1.80 0.072 -.249068 .0104467
|
_cons | .5028145 .1221126 4.12 0.000 .2634783 .7421508
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0102924 .0023646 4.35 0.000 .0056579 .0149269
fr_low_prod | .0350792 .0049319 7.11 0.000 .0254128 .0447455
u_eng_dummy | .0210797 .0024999 8.43 0.000 .01618 .0259793
merchant_d | .016509 .0017065 9.67 0.000 .0131644 .0198536
dlog_high_end_cap | .0072844 .0011642 6.26 0.000 .0050026 .0095663
dlog_low_end_cap | .0133666 .0041805 3.20 0.001 .0051731 .0215601
log_firm_total | .0081239 .0008885 9.14 0.000 .0063823 .0098654
firm_age | .001716 .0001948 8.81 0.000 .0013342 .0020978
|
year_half_year |
18932 | 0 (empty)
18941 | .0734757 .0082471 8.91 0.000 .0573117 .0896398
18942 | .0733243 .0085884 8.54 0.000 .0564913 .0901573
18951 | .0715124 .0081103 8.82 0.000 .0556166 .0874083
18952 | .0704947 .0077621 9.08 0.000 .0552812 .0857082
18961 | .0701267 .0076053 9.22 0.000 .0552205 .0850328
18962 | .0681621 .0072943 9.34 0.000 .0538656 .0824586
18971 | .0673713 .0068561 9.83 0.000 .0539337 .080809
18972 | .0670389 .0067253 9.97 0.000 .0538575 .0802202
18981 | .0673623 .0066524 10.13 0.000 .0543238 .0804008
18982 | .0661455 .006619 9.99 0.000 .0531725 .0791185
18991 | .0672124 .0067041 10.03 0.000 .0540725 .0803522
18992 | .0670286 .0066696 10.05 0.000 .0539565 .0801007
19001 | .0668469 .0066543 10.05 0.000 .0538048 .0798891
19002 | .0661103 .0066482 9.94 0.000 .0530802 .0791405
19011 | .0662727 .0066808 9.92 0.000 .0531786 .0793668
19012 | .0665646 .0067018 9.93 0.000 .0534294 .0796998
19021 | .0690088 .0068489 10.08 0.000 .0555851 .0824324
19022 | .0702242 .0072762 9.65 0.000 .0559632 .0844853
19031 | .071554 .0074921 9.55 0.000 .0568696 .0862383
19032 | .0710545 .0073121 9.72 0.000 .0567231 .0853859
19041 | .0705163 .0072906 9.67 0.000 .056227 .0848056
19042 | .0703472 .0072227 9.74 0.000 .0561911 .0845034
19051 | .0710427 .0070885 10.02 0.000 .0571495 .0849358
19052 | .0703586 .0069957 10.06 0.000 .0566473 .0840698
19061 | .0717094 .0071691 10.00 0.000 .0576583 .0857605
19062 | .0745955 .0076345 9.77 0.000 .0596322 .0895589
19071 | .075216 .007734 9.73 0.000 .0600577 .0903743
19072 | .0752294 .0077201 9.74 0.000 .0600982 .0903606
19081 | .0764528 .0079465 9.62 0.000 .060878 .0920276
19082 | .0762798 .0079304 9.62 0.000 .0607365 .0918232
19091 | .0770842 .0083807 9.20 0.000 .0606582 .0935101
19092 | .077142 .0083862 9.20 0.000 .0607052 .0935787
19101 | .0766161 .0082918 9.24 0.000 .0603644 .0928677
19102 | .07771 .0085966 9.04 0.000 .060861 .094559
19111 | .0787629 .0087326 9.02 0.000 .0616474 .0958784
19112 | .0814798 .0092549 8.80 0.000 .0633405 .0996191
19121 | .0807194 .0089771 8.99 0.000 .0631246 .0983143
19122 | .0797725 .0087639 9.10 0.000 .0625955 .0969494
19131 | .0794702 .0085784 9.26 0.000 .0626569 .0962835
19132 | .0801005 .0085179 9.40 0.000 .0634058 .0967952
|
_cons | .0813876 .0076767 10.60 0.000 .0663415 .0964337
------------------------------------------------------------------------------------
r; t=472.33 18:37:01
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_1_modified
set rmsg off
r; t=0.00 19:48:46
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | .011584 .0115483 1.00 0.316 -.0110503 .0342182
fr_low_prod | -.0289046 .0284083 -1.02 0.309 -.0845838 .0267745
u_eng_dummy | .0640513 .0249542 2.57 0.010 .015142 .1129606
merchant_d | .0253698 .0182248 1.39 0.164 -.0103501 .0610896
dlog_high_end_cap | .0194187 .0067558 2.87 0.004 .0061775 .0326598
dlog_low_end_cap | .0140216 .016539 0.85 0.397 -.0183941 .0464374
log_firm_total | -.0297117 .0150901 -1.97 0.049 -.0592877 -.0001357
firm_age | -.0056414 .0020315 -2.78 0.005 -.009623 -.0016598
|
year_half_year |
18932 | 0 (empty)
18941 | -.2317689 .1090228 -2.13 0.034 -.4454497 -.0180882
18942 | -.1436358 .0838155 -1.71 0.087 -.3079111 .0206395
18951 | -.2202479 .0584364 -3.77 0.000 -.3347811 -.1057146
18952 | -.1707528 .0757536 -2.25 0.024 -.3192272 -.0222785
18961 | -.2633647 .0548826 -4.80 0.000 -.3709326 -.1557967
18962 | -.0503435 .0843317 -0.60 0.551 -.2156306 .1149437
18971 | -.2351455 .0616137 -3.82 0.000 -.3559062 -.1143848
18972 | -.2469799 .0769269 -3.21 0.001 -.3977539 -.0962058
18981 | -.3053482 .0928834 -3.29 0.001 -.4873963 -.1233002
18982 | -.1615233 .0693215 -2.33 0.020 -.2973909 -.0256556
18991 | -.1003088 .0715964 -1.40 0.161 -.2406351 .0400176
18992 | -.2652828 .0660639 -4.02 0.000 -.3947657 -.1357999
19001 | -.649077 .077672 -8.36 0.000 -.8013113 -.4968427
19002 | -.0583173 .0707663 -0.82 0.410 -.1970167 .0803822
19011 | -.1169698 .0667382 -1.75 0.080 -.2477743 .0138347
19012 | -.0682318 .068608 -0.99 0.320 -.202701 .0662374
19021 | -.2446027 .058215 -4.20 0.000 -.3587019 -.1305034
19022 | -.1923108 .0705746 -2.72 0.006 -.3306344 -.0539871
19031 | -.2276858 .0638652 -3.57 0.000 -.3528592 -.1025124
19032 | -.496904 .1053347 -4.72 0.000 -.7033563 -.2904517
19041 | -.0445772 .0579341 -0.77 0.442 -.158126 .0689716
19042 | .148938 .1085848 1.37 0.170 -.0638843 .3617602
19051 | -.1532124 .0639811 -2.39 0.017 -.278613 -.0278117
19052 | -.1231437 .0600201 -2.05 0.040 -.240781 -.0055064
19061 | -.2099461 .060778 -3.45 0.001 -.3290687 -.0908234
19062 | -.1155281 .0599645 -1.93 0.054 -.2330563 .002
19071 | -.2254107 .058705 -3.84 0.000 -.3404704 -.110351
19072 | -.2584648 .0637141 -4.06 0.000 -.3833423 -.1335874
19081 | -.2585993 .0636831 -4.06 0.000 -.3834159 -.1337828
19082 | -.0439159 .0624821 -0.70 0.482 -.1663786 .0785468
19091 | -.1905091 .0605654 -3.15 0.002 -.3092151 -.0718032
19092 | -.1563912 .0748209 -2.09 0.037 -.3030375 -.0097449
19101 | -.2239604 .0658515 -3.40 0.001 -.3530269 -.0948938
19102 | -.1076963 .0667224 -1.61 0.107 -.2384697 .0230772
19111 | -.1162379 .0643589 -1.81 0.071 -.2423791 .0099033
19112 | -.0372259 .0697381 -0.53 0.593 -.1739101 .0994584
19121 | -.0635743 .0637459 -1.00 0.319 -.1885139 .0613653
19122 | -.1285104 .0642467 -2.00 0.045 -.2544316 -.0025892
19131 | -.1164261 .0652337 -1.78 0.074 -.2442819 .0114296
19132 | -.1193106 .0658581 -1.81 0.070 -.2483901 .0097688
|
_cons | .5028145 .1261369 3.99 0.000 .2555908 .7500383
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0102924 .0026386 3.90 0.000 .0051209 .0154639
fr_low_prod | .0350792 .0052512 6.68 0.000 .0247869 .0453714
u_eng_dummy | .0210797 .0024966 8.44 0.000 .0161863 .025973
merchant_d | .016509 .0016832 9.81 0.000 .0132099 .019808
dlog_high_end_cap | .0072844 .0011647 6.25 0.000 .0050016 .0095672
dlog_low_end_cap | .0133666 .0041829 3.20 0.001 .0051683 .0215649
log_firm_total | .0081239 .0009311 8.73 0.000 .006299 .0099487
firm_age | .001716 .0002068 8.30 0.000 .0013107 .0021213
|
year_half_year |
18932 | 0 (empty)
18941 | .0734757 .0082405 8.92 0.000 .0573245 .0896269
18942 | .0733243 .0085833 8.54 0.000 .0565013 .0901474
18951 | .0715124 .0081062 8.82 0.000 .0556245 .0874004
18952 | .0704947 .0077577 9.09 0.000 .05529 .0856995
18961 | .0701267 .0076001 9.23 0.000 .0552307 .0850226
18962 | .0681621 .0072897 9.35 0.000 .0538746 .0824496
18971 | .0673713 .0068513 9.83 0.000 .053943 .0807997
18972 | .0670389 .0067211 9.97 0.000 .0538658 .0802119
18981 | .0673623 .0066486 10.13 0.000 .0543313 .0803933
18982 | .0661455 .0066159 10.00 0.000 .0531787 .0791124
18991 | .0672124 .0067014 10.03 0.000 .0540778 .0803469
18992 | .0670286 .0066669 10.05 0.000 .0539617 .0800955
19001 | .0668469 .006653 10.05 0.000 .0538072 .0798866
19002 | .0661103 .006645 9.95 0.000 .0530864 .0791343
19011 | .0662727 .00668 9.92 0.000 .0531802 .0793651
19012 | .0665646 .0066996 9.94 0.000 .0534337 .0796955
19021 | .0690088 .0068489 10.08 0.000 .0555852 .0824324
19022 | .0702242 .0072736 9.65 0.000 .0559683 .0844802
19031 | .071554 .0074895 9.55 0.000 .0568748 .0862331
19032 | .0710545 .0073078 9.72 0.000 .0567314 .0853776
19041 | .0705163 .0072858 9.68 0.000 .0562364 .0847963
19042 | .0703472 .0072178 9.75 0.000 .0562005 .0844939
19051 | .0710427 .0070847 10.03 0.000 .0571569 .0849285
19052 | .0703586 .006992 10.06 0.000 .0566545 .0840626
19061 | .0717094 .007165 10.01 0.000 .0576663 .0857525
19062 | .0745955 .0076286 9.78 0.000 .0596437 .0895473
19071 | .075216 .0077298 9.73 0.000 .0600658 .0903662
19072 | .0752294 .0077164 9.75 0.000 .0601055 .0903533
19081 | .0764528 .0079403 9.63 0.000 .0608901 .0920155
19082 | .0762798 .0079241 9.63 0.000 .0607489 .0918108
19091 | .0770842 .0083698 9.21 0.000 .0606797 .0934886
19092 | .077142 .0083779 9.21 0.000 .0607215 .0935624
19101 | .0766161 .0082852 9.25 0.000 .0603775 .0928547
19102 | .07771 .0085889 9.05 0.000 .0608761 .0945438
19111 | .0787629 .0087238 9.03 0.000 .0616646 .0958612
19112 | .0814798 .0092431 8.82 0.000 .0633636 .099596
19121 | .0807194 .0089631 9.01 0.000 .063152 .0982868
19122 | .0797725 .0087554 9.11 0.000 .0626123 .0969326
19131 | .0794702 .0085687 9.27 0.000 .0626759 .0962645
19132 | .0801005 .0085059 9.42 0.000 .0634293 .0967717
|
_cons | .0813876 .0078062 10.43 0.000 .0660877 .0966875
------------------------------------------------------------------------------------
r; t=505.41 19:57:12
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_2_original
set rmsg off
r; t=0.00 21:30:10
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | -.0136359 .0087412 -1.56 0.119 -.0307683 .0034965
fr_low_prod | -.0804099 .0338987 -2.37 0.018 -.1468501 -.0139696
upgrade_exper_lo~t | .081418 .0197699 4.12 0.000 .0426697 .1201663
u_eng_dummy | .0709999 .0253241 2.80 0.005 .0213656 .1206341
merchant_d | .0218151 .0189839 1.15 0.251 -.0153927 .0590229
dlog_high_end_cap | .0187246 .0070012 2.67 0.007 .0050024 .0324467
dlog_low_end_cap | .0118077 .0162206 0.73 0.467 -.0199841 .0435995
log_firm_total | -.0458702 .0153819 -2.98 0.003 -.0760181 -.0157222
firm_age | -.0089447 .002102 -4.26 0.000 -.0130645 -.0048249
|
year_half_year |
18932 | 0 (empty)
18941 | -.2315487 .1090091 -2.12 0.034 -.4452026 -.0178947
18942 | -.1509977 .0819321 -1.84 0.065 -.3115817 .0095864
18951 | -.2264304 .0570758 -3.97 0.000 -.3382968 -.114564
18952 | -.179645 .0743596 -2.42 0.016 -.325387 -.0339029
18961 | -.2694846 .0529201 -5.09 0.000 -.373206 -.1657632
18962 | -.0559701 .0835881 -0.67 0.503 -.2197999 .1078596
18971 | -.2358472 .0600893 -3.92 0.000 -.3536202 -.1180743
18972 | -.2513013 .0758327 -3.31 0.001 -.3999307 -.1026719
18981 | -.3068619 .0920105 -3.34 0.001 -.4871991 -.1265247
18982 | -.1646867 .0688441 -2.39 0.017 -.2996187 -.0297546
18991 | -.098971 .0701112 -1.41 0.158 -.2363863 .0384444
18992 | -.2624017 .0649904 -4.04 0.000 -.3897804 -.1350229
19001 | -.6421264 .0768054 -8.36 0.000 -.7926622 -.4915906
19002 | -.0607489 .0695333 -0.87 0.382 -.1970316 .0755339
19011 | -.1136716 .0655635 -1.73 0.083 -.2421737 .0148304
19012 | -.0648759 .0674915 -0.96 0.336 -.1971568 .067405
19021 | -.2349313 .0576239 -4.08 0.000 -.347872 -.1219905
19022 | -.1831559 .0707698 -2.59 0.010 -.3218621 -.0444497
19031 | -.2171855 .0638983 -3.40 0.001 -.3424238 -.0919472
19032 | -.4896982 .1049375 -4.67 0.000 -.695372 -.2840245
19041 | -.0418287 .0578407 -0.72 0.470 -.1551945 .071537
19042 | .1523369 .1080407 1.41 0.159 -.059419 .3640928
19051 | -.1411425 .0642063 -2.20 0.028 -.2669846 -.0153005
19052 | -.1094506 .0601442 -1.82 0.069 -.2273311 .00843
19061 | -.1917889 .0603472 -3.18 0.001 -.3100673 -.0735105
19062 | -.0970968 .0593456 -1.64 0.102 -.213412 .0192184
19071 | -.2046371 .0583906 -3.50 0.000 -.3190806 -.0901936
19072 | -.2377659 .063074 -3.77 0.000 -.3613886 -.1141431
19081 | -.2402924 .0629556 -3.82 0.000 -.3636832 -.1169016
19082 | -.028004 .0617743 -0.45 0.650 -.1490794 .0930714
19091 | -.1711682 .060882 -2.81 0.005 -.2904948 -.0518416
19092 | -.141601 .0736876 -1.92 0.055 -.2860262 .0028241
19101 | -.2078389 .0656235 -3.17 0.002 -.3364585 -.0792192
19102 | -.0954905 .0655307 -1.46 0.145 -.2239283 .0329473
19111 | -.0968287 .0646594 -1.50 0.134 -.2235588 .0299015
19112 | -.0166007 .0697452 -0.24 0.812 -.1532987 .1200973
19121 | -.0365185 .0649846 -0.56 0.574 -.163886 .090849
19122 | -.099508 .0660866 -1.51 0.132 -.2290354 .0300193
19131 | -.0824395 .0668156 -1.23 0.217 -.2133957 .0485166
19132 | -.0818231 .0679207 -1.20 0.228 -.2149452 .0512991
|
_cons | .6813047 .1364541 4.99 0.000 .4138596 .9487499
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0123694 .0047561 2.60 0.009 .0030476 .0216911
fr_low_prod | .0376921 .0062059 6.07 0.000 .0255288 .0498554
upgrade_exper_lo~t | .0223423 .0064298 3.47 0.001 .0097402 .0349444
u_eng_dummy | .0210835 .0025112 8.40 0.000 .0161617 .0260053
merchant_d | .0164733 .001711 9.63 0.000 .0131198 .0198267
dlog_high_end_cap | .0072584 .0011591 6.26 0.000 .0049865 .0095303
dlog_low_end_cap | .0133281 .0041748 3.19 0.001 .0051458 .0215105
log_firm_total | .0092273 .0009792 9.42 0.000 .007308 .0111465
firm_age | .0019348 .0002109 9.17 0.000 .0015214 .0023481
|
year_half_year |
18932 | 0 (empty)
18941 | .0731881 .0082139 8.91 0.000 .0570891 .0892871
18942 | .0730652 .0085599 8.54 0.000 .0562882 .0898422
18951 | .0712527 .0080819 8.82 0.000 .0554124 .0870929
18952 | .0702611 .0077366 9.08 0.000 .0550976 .0854246
18961 | .0698723 .0075797 9.22 0.000 .0550163 .0847283
18962 | .0679128 .0072679 9.34 0.000 .053668 .0821577
18971 | .0671078 .0068271 9.83 0.000 .0537271 .0804886
18972 | .0667869 .0067011 9.97 0.000 .0536531 .0799208
18981 | .0670998 .0066254 10.13 0.000 .0541142 .0800855
18982 | .0658923 .0065927 9.99 0.000 .0529708 .0788138
18991 | .0669502 .0066785 10.02 0.000 .0538607 .0800398
18992 | .0667709 .0066441 10.05 0.000 .0537486 .0797932
19001 | .0666125 .0066288 10.05 0.000 .0536203 .0796048
19002 | .0658549 .0066228 9.94 0.000 .0528745 .0788353
19011 | .0660194 .0066548 9.92 0.000 .0529761 .0790626
19012 | .0663104 .0066754 9.93 0.000 .0532269 .0793939
19021 | .0687898 .0068287 10.07 0.000 .0554057 .0821739
19022 | .0699944 .0072536 9.65 0.000 .0557776 .0842111
19031 | .071332 .0074687 9.55 0.000 .0566937 .0859704
19032 | .0708039 .0072865 9.72 0.000 .0565227 .0850852
19041 | .0702443 .0072652 9.67 0.000 .0560047 .0844839
19042 | .070078 .0071979 9.74 0.000 .0559704 .0841856
19051 | .070842 .0070632 10.03 0.000 .0569984 .0846856
19052 | .0701838 .0069713 10.07 0.000 .0565202 .0838473
19061 | .0716022 .0071458 10.02 0.000 .0575966 .0856078
19062 | .0744754 .0076107 9.79 0.000 .0595587 .0893922
19071 | .0751381 .0077052 9.75 0.000 .0600362 .09024
19072 | .0751498 .0076866 9.78 0.000 .0600844 .0902153
19081 | .076319 .007911 9.65 0.000 .0608138 .0918242
19082 | .0761066 .0078995 9.63 0.000 .0606238 .0915893
19091 | .0769656 .008351 9.22 0.000 .0605978 .0933333
19092 | .076947 .0083608 9.20 0.000 .0605602 .0933339
19101 | .0764442 .0082618 9.25 0.000 .0602515 .092637
19102 | .0774782 .0085649 9.05 0.000 .0606913 .0942651
19111 | .0786351 .0086977 9.04 0.000 .061588 .0956822
19112 | .0813579 .0092231 8.82 0.000 .0632809 .099435
19121 | .0807455 .0089422 9.03 0.000 .0632191 .0982719
19122 | .0798577 .0087262 9.15 0.000 .0627547 .0969607
19131 | .0797066 .0085406 9.33 0.000 .0629674 .0964458
19132 | .0804473 .0084865 9.48 0.000 .0638141 .0970805
|
_cons | .0947167 .0089509 10.58 0.000 .0771732 .1122601
------------------------------------------------------------------------------------
r; t=546.99 21:39:17
sysdir set PERSONAL "/Applications/Stata/ado/personal/"
set rmsg on
bootstrap _b _se, reps(1000) seed(197406) nodots cluster(firmID) idcluster(newid) nowarn: boos_2sls_2_modified
set rmsg off
r; t=0.00 22:32:06
Bootstrap results Number of obs = 1,608
Replications = 1,000
(Replications based on 99 clusters in firmID)
------------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| coefficient std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
b |
num_exper_up~m_hat | -.0136359 .013527 -1.01 0.313 -.0401483 .0128765
fr_low_prod | -.0804099 .0352664 -2.28 0.023 -.1495306 -.0112891
upgrade_exper_lo~t | .081418 .0340635 2.39 0.017 .0146548 .1481812
u_eng_dummy | .0709999 .0266415 2.67 0.008 .0187834 .1232163
merchant_d | .0218151 .019978 1.09 0.275 -.0173411 .0609712
dlog_high_end_cap | .0187246 .006934 2.70 0.007 .0051343 .0323149
dlog_low_end_cap | .0118077 .0160006 0.74 0.461 -.019553 .0431683
log_firm_total | -.0458702 .0182134 -2.52 0.012 -.0815677 -.0101726
firm_age | -.0089447 .002656 -3.37 0.001 -.0141504 -.003739
|
year_half_year |
18932 | 0 (empty)
18941 | -.2315487 .1092369 -2.12 0.034 -.4456491 -.0174483
18942 | -.1509977 .0820268 -1.84 0.066 -.3117673 .009772
18951 | -.2264304 .0577743 -3.92 0.000 -.339666 -.1131948
18952 | -.179645 .0744597 -2.41 0.016 -.3255834 -.0337066
18961 | -.2694846 .053507 -5.04 0.000 -.3743564 -.1646128
18962 | -.0559701 .0834335 -0.67 0.502 -.2194969 .1075566
18971 | -.2358472 .0603963 -3.90 0.000 -.3542218 -.1174727
18972 | -.2513013 .0757621 -3.32 0.001 -.3997923 -.1028103
18981 | -.3068619 .0924291 -3.32 0.001 -.4880197 -.1257041
18982 | -.1646867 .0689877 -2.39 0.017 -.2999 -.0294733
18991 | -.098971 .0703185 -1.41 0.159 -.2367927 .0388508
18992 | -.2624017 .0649865 -4.04 0.000 -.3897729 -.1350305
19001 | -.6421264 .0773704 -8.30 0.000 -.7937695 -.4904833
19002 | -.0607489 .070182 -0.87 0.387 -.1983031 .0768054
19011 | -.1136716 .0658935 -1.73 0.085 -.2428204 .0154771
19012 | -.0648759 .0679492 -0.95 0.340 -.1980539 .068302
19021 | -.2349313 .0580572 -4.05 0.000 -.3487213 -.1211412
19022 | -.1831559 .0713461 -2.57 0.010 -.3229918 -.0433201
19031 | -.2171855 .0642965 -3.38 0.001 -.3432044 -.0911667
19032 | -.4896982 .1043097 -4.69 0.000 -.6941415 -.2852549
19041 | -.0418287 .0582154 -0.72 0.472 -.1559288 .0722714
19042 | .1523369 .1076383 1.42 0.157 -.0586303 .3633041
19051 | -.1411425 .0644141 -2.19 0.028 -.2673918 -.0148933
19052 | -.1094506 .0607772 -1.80 0.072 -.2285718 .0096706
19061 | -.1917889 .0611768 -3.13 0.002 -.3116933 -.0718845
19062 | -.0970968 .0607212 -1.60 0.110 -.2161082 .0219146
19071 | -.2046371 .0598543 -3.42 0.001 -.3219494 -.0873249
19072 | -.2377659 .0646629 -3.68 0.000 -.3645028 -.1110289
19081 | -.2402924 .0641145 -3.75 0.000 -.3659546 -.1146302
19082 | -.028004 .0619641 -0.45 0.651 -.1494513 .0934434
19091 | -.1711682 .061139 -2.80 0.005 -.2909985 -.0513379
19092 | -.141601 .0745523 -1.90 0.058 -.2877209 .0045189
19101 | -.2078389 .0671255 -3.10 0.002 -.3394024 -.0762753
19102 | -.0954905 .0665397 -1.44 0.151 -.225906 .034925
19111 | -.0968287 .0662731 -1.46 0.144 -.2267215 .0330641
19112 | -.0166007 .0715186 -0.23 0.816 -.1567745 .1235732
19121 | -.0365185 .0670752 -0.54 0.586 -.1679834 .0949464
19122 | -.099508 .0671677 -1.48 0.138 -.2311543 .0321382
19131 | -.0824395 .0690757 -1.19 0.233 -.2178255 .0529464
19132 | -.0818231 .0698396 -1.17 0.241 -.2187063 .0550601
|
_cons | .6813047 .1582127 4.31 0.000 .3712135 .991396
-------------------+----------------------------------------------------------------
se |
num_exper_up~m_hat | .0123694 .0063982 1.93 0.053 -.000171 .0249097
fr_low_prod | .0376921 .0060403 6.24 0.000 .0258534 .0495308
upgrade_exper_lo~t | .0223423 .0092527 2.41 0.016 .0042073 .0404773
u_eng_dummy | .0210835 .0025002 8.43 0.000 .0161833 .0259838
merchant_d | .0164733 .0016729 9.85 0.000 .0131944 .0197521
dlog_high_end_cap | .0072584 .0011597 6.26 0.000 .0049855 .0095313
dlog_low_end_cap | .0133281 .0041717 3.19 0.001 .0051518 .0215045
log_firm_total | .0092273 .0010669 8.65 0.000 .0071362 .0113184
firm_age | .0019348 .0002394 8.08 0.000 .0014656 .0024039
|
year_half_year |
18932 | 0 (empty)
18941 | .0731881 .0081864 8.94 0.000 .0571429 .0892332
18942 | .0730652 .0085341 8.56 0.000 .0563386 .0897918
18951 | .0712527 .0080583 8.84 0.000 .0554588 .0870465
18952 | .0702611 .0077128 9.11 0.000 .0551443 .085378
18961 | .0698723 .0075546 9.25 0.000 .0550655 .0846791
18962 | .0679128 .007244 9.38 0.000 .0537149 .0821107
18971 | .0671078 .0068042 9.86 0.000 .053772 .0804437
18972 | .0667869 .0066798 10.00 0.000 .0536947 .0798792
18981 | .0670998 .0066067 10.16 0.000 .0541509 .0800488
18982 | .0658923 .0065766 10.02 0.000 .0530023 .0787823
18991 | .0669502 .0066612 10.05 0.000 .0538945 .0800059
18992 | .0667709 .0066267 10.08 0.000 .0537827 .0797591
19001 | .0666125 .0066144 10.07 0.000 .0536486 .0795765
19002 | .0658549 .0066065 9.97 0.000 .0529064 .0788034
19011 | .0660194 .006641 9.94 0.000 .0530034 .0790354
19012 | .0663104 .0066592 9.96 0.000 .0532586 .0793621
19021 | .0687898 .0068146 10.09 0.000 .0554334 .0821462
19022 | .0699944 .0072379 9.67 0.000 .0558084 .0841803
19031 | .071332 .007452 9.57 0.000 .0567264 .0859377
19032 | .0708039 .0072708 9.74 0.000 .0565534 .0850545
19041 | .0702443 .0072499 9.69 0.000 .0560347 .0844538
19042 | .070078 .0071817 9.76 0.000 .056002 .0841539
19051 | .070842 .0070477 10.05 0.000 .0570288 .0846552
19052 | .0701838 .0069518 10.10 0.000 .0565586 .083809
19061 | .0716022 .0071259 10.05 0.000 .0576358 .0855687
19062 | .0744754 .0075888 9.81 0.000 .0596017 .0893491
19071 | .0751381 .0076813 9.78 0.000 .060083 .0901932
19072 | .0751498 .0076653 9.80 0.000 .0601261 .0901736
19081 | .076319 .0078871 9.68 0.000 .0608605 .0917775
19082 | .0761066 .0078767 9.66 0.000 .0606684 .0915447
19091 | .0769656 .0083193 9.25 0.000 .06066 .0932711
19092 | .076947 .0083305 9.24 0.000 .0606195 .0932746
19101 | .0764442 .0082333 9.28 0.000 .0603073 .0925812
19102 | .0774782 .0085371 9.08 0.000 .0607457 .0942106
19111 | .0786351 .0086645 9.08 0.000 .061653 .0956172
19112 | .0813579 .009187 8.86 0.000 .0633517 .0993641
19121 | .0807455 .0089034 9.07 0.000 .063295 .0981959
19122 | .0798577 .008695 9.18 0.000 .0628157 .0968997
19131 | .0797066 .0085051 9.37 0.000 .0630369 .0963763
19132 | .0804473 .0084515 9.52 0.000 .0638826 .097012
|
_cons | .0947167 .0090575 10.46 0.000 .0769643 .1124691
------------------------------------------------------------------------------------
r; t=576.94 22:41:43