Stata Technical Bulletin
Figure 1
In this specification, neither age nor systolic blood pressure affects the cholesterol level. But suppose that the systolic blood
pressure variable is jointly determined with the cholesterol level, chi, such that each affects the other. In that case, the ordinary
least squares estimator of the impact of sbp is biased and one must use two-stage least squares, also known as instrumental
variable estimation. Suppose that the socioeconomic status of the subject (ses in the evans2.dta dataset) is thought to be
correlated with sbp but not a function of chi and not a direct influence on chi. In that case, ses can be used as an instrument
for sbp.
This revised specification of the model can be estimated as follows:
. regpred2 chi sbp, f(60) t(300) i(20) adj(age smk) inst(age smk ses)
> level(90) xlabel ylabel
Source I |
SS |
df |
MS |
Number of obs |
(2SLS) = 1218 = 3.62 = 0.0128 | ||
Model I Residual ∣ |
-7098941.09 9027740.07 |
3 |
-2366313.70 7436.3592 | ||||
________ __|__ Total I |
1928798.98 |
1217 |
1584. |
— 88001 |
= 86.234 | ||
— chi I |
Coef. |
Std. |
Err. |
t |
p>∣t∣ |
[907. Conf. |
— Interval] |
---------+. sbp I _cons I |
-2.892893 2.751821 8.58432 479.3413 |
.8801326 .8866685 5.976911 82.25801 |
-3.287 3.104 1.436 5.827 |
0.001 0.002 0.151 0.000 |
-4.341687 1.292268 -1.254331 343.9356 |
— -1.444098 4.211375 18.42297 614.747 |
Predicted Values and 90% Confidence Intervals
Outcome Variable: Serum cholesterol — chi
Independent Variable: Systolic blood pressure — sbp
Covariates: age smk
Instruments: age smk ses
Variables set to Zero:
Variables set to One:
Total Observations: 1218
Confidence interval: 90
sbp |
pred_y |
lower |
upper | |
1. |
60 |
459.0124 |
335.2027 |
582.822 |
2. |
80 |
401.1545 |
306.2782 |
496.0308 |
3. |
100 |
343.2966 |
277.3359 |
409.2574 |
4. |
120 |
285.4388 |
248.3339 |
322.5436 |
5. |
140 |
227.5809 |
218.672 |
236.4899 |
6. |
160 |
169.7231 |
148.3079 |
191.1383 |
7. |
180 |
111.8652 |
61.72051 |
162.01 |
8. |
200 |
54.00739 |
-25.03071 |
133.0455 |
9. |
220 |
-3.850462 |
-111.8143 |
104.1134 |
10. |
240 |
-61.70831 |
-198.6098 |
75.19314 |
11. |
260 |
-119.5662 |
-285.4109 |
46.27853 |
12. |
280 |
-177.424 |
-372.2151 |
17.36707 |
13. |
300 |
-235.2819 |
-459.0212 |
-11.54249 |