Goodmorning everybody. I have the following problem. I need to compute the nonlinear combination of two previously estimated regression parameters and its bootstrap standard errors. I am running the following program, that apparently works fine. But the bootstrapped standard errors are implausibly (in my view) big. The problem gets worse if I increase the number of bootstrap replications and does not depend on the seed. It also gets worse if I increase the number at the exponent. Any insights? Many thanks in advance! G
*****This is the program:
use data.dta, clear
program define bootstr, rclass
reg y1 x if sample1==3
est store pred1
reg y2 x if sample2==3
est store pred2
suest pred1 pred2, r
local beta1=[pred1_mean]x
local beta2=[pred2_mean]x
display `beta1'
display `beta2'
suest pred1 pred2, r
return scalar comb = (([pred2_mean]x / [pred1_mean]x))^15
end
bootstr
bootstrap comb=r(comb), reps(1000) seed(123): bootstr
****The output is:
. bootstr
Source | SS df MS Number of obs = 700
-------------+---------------------------------- F(1, 742) = 113.77
Model | 89138.2261 1 89138.2261 Prob > F = 0.0000
Residual | 581349.365 742 783.489711 R-squared = 0.1329
-------------+---------------------------------- Adj R-squared = 0.1318
Total | 670487.591 743 902.40591 Root MSE = 27.991
------------------------------------------------------------------------------
y1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | .4987301 .0467574 10.67 0.000 .4069376 .5905226
_cons | 24.23444 3.847356 6.30 0.000 16.68144 31.78744
------------------------------------------------------------------------------
Source | SS df MS Number of obs = 159
-------------+---------------------------------- F(1, 157) = 10.73
Model | 7734.32668 1 7734.32668 Prob > F = 0.0013
Residual | 113151.422 157 720.709693 R-squared = 0.0640
-------------+---------------------------------- Adj R-squared = 0.0580
Total | 120885.748 158 765.099674 Root MSE = 26.846
------------------------------------------------------------------------------
y2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | .3954244 .120707 3.28 0.001 .1570053 .6338435
_cons | 32.63701 10.45339 3.12 0.002 11.98959 53.28442
------------------------------------------------------------------------------
Simultaneous results for pred1, pred2
Number of obs = 700
------------------------------------------------------------------------------
| Robust
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
pred1_mean |
x | .4987301 .0520144 9.59 0.000 .3967838 .6006764
_cons | 24.23444 4.390566 5.52 0.000 15.62909 32.83979
-------------+----------------------------------------------------------------
pred1_lnvar |
_cons | 6.663758 .0529112 125.94 0.000 6.560054 6.767462
-------------+----------------------------------------------------------------
pred2_mean |
x | .3954244 .1272472 3.11 0.002 .1460244 .6448244
_cons | 32.63701 11.05678 2.95 0.003 10.96611 54.30791
-------------+----------------------------------------------------------------
pred2_lnvar |
_cons | 6.580236 .1209233 54.42 0.000 6.343231 6.817242
------------------------------------------------------------------------------
.49873011
.39542437
Simultaneous results for pred1, pred2
Number of obs = 700
------------------------------------------------------------------------------
| Robust
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
pred1_mean |
x | .4987301 .0520144 9.59 0.000 .3967838 .6006764
_cons | 24.23444 4.390566 5.52 0.000 15.62909 32.83979
-------------+----------------------------------------------------------------
pred1_lnvar |
_cons | 6.663758 .0529112 125.94 0.000 6.560054 6.767462
-------------+----------------------------------------------------------------
pred2_mean |
x | .3954244 .1272472 3.11 0.002 .1460244 .6448244
_cons | 32.63701 11.05678 2.95 0.003 10.96611 54.30791
-------------+----------------------------------------------------------------
pred2_lnvar |
_cons | 6.580236 .1209233 54.42 0.000 6.343231 6.817242
------------------------------------------------------------------------------
. bootstrap comb=r(comb), reps(1000) seed(123): bootstr
(running bootstr on estimation sample)
Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
.................................................. 50
.................................................. 100
.................................................. 150
.................................................. 200
.................................................. 250
.................................................. 300
.................................................. 350
.................................................. 400
.................................................. 450
.................................................. 500
.................................................. 550
.................................................. 600
.................................................. 650
.................................................. 700
.................................................. 750
.................................................. 800
.................................................. 850
.................................................. 900
.................................................. 950
.................................................. 1000
Bootstrap results Number of obs = 700
Replications = 1,000
command: bootstr
comb: r(comb)
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
comb | .0307587 42.81222 0.00 0.999 -83.87965 83.94117
------------------------------------------------------------------------------
*****This is the program:
use data.dta, clear
program define bootstr, rclass
reg y1 x if sample1==3
est store pred1
reg y2 x if sample2==3
est store pred2
suest pred1 pred2, r
local beta1=[pred1_mean]x
local beta2=[pred2_mean]x
display `beta1'
display `beta2'
suest pred1 pred2, r
return scalar comb = (([pred2_mean]x / [pred1_mean]x))^15
end
bootstr
bootstrap comb=r(comb), reps(1000) seed(123): bootstr
****The output is:
. bootstr
Source | SS df MS Number of obs = 700
-------------+---------------------------------- F(1, 742) = 113.77
Model | 89138.2261 1 89138.2261 Prob > F = 0.0000
Residual | 581349.365 742 783.489711 R-squared = 0.1329
-------------+---------------------------------- Adj R-squared = 0.1318
Total | 670487.591 743 902.40591 Root MSE = 27.991
------------------------------------------------------------------------------
y1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | .4987301 .0467574 10.67 0.000 .4069376 .5905226
_cons | 24.23444 3.847356 6.30 0.000 16.68144 31.78744
------------------------------------------------------------------------------
Source | SS df MS Number of obs = 159
-------------+---------------------------------- F(1, 157) = 10.73
Model | 7734.32668 1 7734.32668 Prob > F = 0.0013
Residual | 113151.422 157 720.709693 R-squared = 0.0640
-------------+---------------------------------- Adj R-squared = 0.0580
Total | 120885.748 158 765.099674 Root MSE = 26.846
------------------------------------------------------------------------------
y2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | .3954244 .120707 3.28 0.001 .1570053 .6338435
_cons | 32.63701 10.45339 3.12 0.002 11.98959 53.28442
------------------------------------------------------------------------------
Simultaneous results for pred1, pred2
Number of obs = 700
------------------------------------------------------------------------------
| Robust
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
pred1_mean |
x | .4987301 .0520144 9.59 0.000 .3967838 .6006764
_cons | 24.23444 4.390566 5.52 0.000 15.62909 32.83979
-------------+----------------------------------------------------------------
pred1_lnvar |
_cons | 6.663758 .0529112 125.94 0.000 6.560054 6.767462
-------------+----------------------------------------------------------------
pred2_mean |
x | .3954244 .1272472 3.11 0.002 .1460244 .6448244
_cons | 32.63701 11.05678 2.95 0.003 10.96611 54.30791
-------------+----------------------------------------------------------------
pred2_lnvar |
_cons | 6.580236 .1209233 54.42 0.000 6.343231 6.817242
------------------------------------------------------------------------------
.49873011
.39542437
Simultaneous results for pred1, pred2
Number of obs = 700
------------------------------------------------------------------------------
| Robust
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
pred1_mean |
x | .4987301 .0520144 9.59 0.000 .3967838 .6006764
_cons | 24.23444 4.390566 5.52 0.000 15.62909 32.83979
-------------+----------------------------------------------------------------
pred1_lnvar |
_cons | 6.663758 .0529112 125.94 0.000 6.560054 6.767462
-------------+----------------------------------------------------------------
pred2_mean |
x | .3954244 .1272472 3.11 0.002 .1460244 .6448244
_cons | 32.63701 11.05678 2.95 0.003 10.96611 54.30791
-------------+----------------------------------------------------------------
pred2_lnvar |
_cons | 6.580236 .1209233 54.42 0.000 6.343231 6.817242
------------------------------------------------------------------------------
. bootstrap comb=r(comb), reps(1000) seed(123): bootstr
(running bootstr on estimation sample)
Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
.................................................. 50
.................................................. 100
.................................................. 150
.................................................. 200
.................................................. 250
.................................................. 300
.................................................. 350
.................................................. 400
.................................................. 450
.................................................. 500
.................................................. 550
.................................................. 600
.................................................. 650
.................................................. 700
.................................................. 750
.................................................. 800
.................................................. 850
.................................................. 900
.................................................. 950
.................................................. 1000
Bootstrap results Number of obs = 700
Replications = 1,000
command: bootstr
comb: r(comb)
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
comb | .0307587 42.81222 0.00 0.999 -83.87965 83.94117
------------------------------------------------------------------------------
Comment