Class 5
Class 5
Class 5
Multiple Regression
Inference I
Readings:
Wooldridge (2025) Chapter 4
ECON 644 Class 5
Part I
(1) Estimate
Why? Because it makes the link between the sample slope ̂1
and the population slope 1.
Sampling Error
It could, but only with data for the entire population (census).
Otherwise you need to allow for sampling error: the sample,
though random, may not be perfectly representative of the
population.
IF
0 [------- ̂1-------]
THEN
IF
[--0--- ̂1--------]
THEN
To build the CI ˆ1 t se( ˆ1 ) for the causal effect 1 we need:
however:
Note: However, we may not know Var (ˆj ) . Then, we would need
to estimate it.
ECON 644 Class 5
If variance known:
If variance unknown:
--------------------------------------------------------------
salary | Coef. Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
ceoten | 11.74613 6.14774 -.387127 23.87939
_cons | 772.4263 65.67567 642.8079 902.0446
--------------------------------------------------------------
. display _se[ceoten]
6.1477399
. display invt(175,.975)
1.9736125 Note: t-value pretty close to 1.96.
. display _b[ceoten]-invt(175,.975)*_se[ceoten]
-.38712697
. display _b[ceoten]+invt(175,.975)*_se[ceoten]
23.879385
ECON 644 Class 5
Stata: A 99% CI
--------------------------------------------------------------
salary | Coef. Std. Err. [99% Conf. Interval]
-------------+------------------------------------------------
ceoten | 11.74613 6.14774 -4.263905 27.75616
_cons | 772.4263 65.67567 601.3927 943.4598
--------------------------------------------------------------
Part II
H 0 : 1 0
H1 : 1 0
H 0 : 1 20
H1 : 1 20
ECON 644 Class 5
Is the return to CEO tenure at least two times greater than the
return to age?
H 0 : 1 22
H1 : 1 22
H 0 : 1 2 50
H1 : 1 2 50
ECON 644 Class 5
H 0 : 2 0 and 3 0
H1 : 2 0 or 3 0
ECON 644 Class 5
ˆ j
(i) t-stat t -stat
se( ˆ j )
------------------------------------------------------------------------------
salary | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ceoten | 10.55413 6.019706 1.75 0.081 -1.327879 22.43614
age | 1.649817 5.162111 0.32 0.750 -8.539427 11.83906
grad | -43.43346 82.2966 -0.53 0.598 -205.8748 119.0079
mktval | .0371649 .0063706 5.83 0.000 .0245903 .0497395
_cons | 578.0711 288.3528 2.00 0.047 8.905383 1147.237
------------------------------------------------------------------------------
(i) t-statistic
t 1.96
(ii) p-value
2) Test Statistic
3) Critical Threshold
Testing H 0 : j 0 against H1 : j 0
1) Set up the null and alternative hypotheses
ˆ j
2) An appropriate test statistic is which under the closest
ˆ
se( j )
null hypothesis ( j 0 ) has a tnk 1 distribution (by Theorem 4.2).
3) a) Adopt a reasonable confidence level (say, 95%) and find the
2 tails
threshold tn k 1 (0.05) in the tnk 1 distribution beyond which the
probability of getting a tnk 1 value in either tail is 5% . The
rejection region is tnk 1 tn2tails
k 1 (0.05) .
ˆ j
4) a) Reject H 0 if the test statistic is in the rejection
se( ˆ j )
region. Otherwise, don't reject H 0 .
ˆ j
3) b) Compute the p value of the test: P tnk 1
ˆ
se( j )
4) b) Reject H 0 if the p value is low enough.
ECON 644 Class 5
. display invt(25,.025)
-2.0595386
. display invt(25,.975)
2.0595386
ECON 644 Class 5
Magnitude Tests
(i) t-stat
(a) compute t-stat
(b) compare to critical-t
(ii) p-value
(a) compute p-value
(b) compare to significance level
( 1) ceoten = 0
F( 1, 172) = 3.07
Prob > F = 0.0813
( 1) ceoten = 20
F( 1, 172) = 2.46
Prob > F = 0.1184
Note: p-value > 0.05, can’t reject H 0 , it’s possible the effect is 20.
ECON 644 Class 5
c [------- ̂ -------]
[---c--- ̂ --------]
Confidence Interval
------------------------------------------------------------------------------
salary | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ceoten | 10.55413 6.019706 1.75 0.081 -1.327879 22.43614
age | 1.649817 5.162111 0.32 0.750 -8.539427 11.83906
grad | -43.43346 82.2966 -0.53 0.598 -205.8748 119.0079
mktval | .0371649 .0063706 5.83 0.000 .0245903 .0497395
_cons | 578.0711 288.3528 2.00 0.047 8.905383 1147.237
------------------------------------------------------------------------------
ˆ j j
Theorem 4.2 says that ~ tnk 1 . This means that:
ˆ
se( j )
2 tails ˆ j j 2 tails
P tnk 1 ( ) tnk 1 ( ) 1
se( ˆ j )
If we rearrange, we can get:
P ˆ j tn2tails
k 1 ( ) se( ˆ
j ) j ˆ
j t n k 1 ( ) se( j ) 1
2 tails ˆ
Note: Stata reports the exact CI, not the approximate CI.
ECON 644 Class 5
The Triple S
Intermediate scenarios:
right sign, large size, low significance.
Action: Is it because sample size too low? If so, you could still
make your case, but results look weak.
Part III
(1) Scalars
(1) Scalars
r() scalars
. summarize salary
. return list
scalars:
r(N) = 177
r(sum_w) = 177
r(mean) = 865.8644067796611
r(Var) = 345261.1633281973
r(sd) = 587.5892811549554
r(min) = 100
r(max) = 5299
r(sum) = 153258
ECON 644 Class 5
e() scalars
. regress salary ceoten
------------------------------------------------------------------------------
salary | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ceoten | 11.74613 6.14774 1.91 0.058 -.387127 23.87939
_cons | 772.4263 65.67567 11.76 0.000 642.8079 902.0446
------------------------------------------------------------------------------
. ereturn list
scalars:
e(N) = 177
e(df_m) = 1
e(df_r) = 175
e(F) = 3.650552266347093
e(r2) = .0204340385184175
e(rmse) = 583.2141027176848
e(mss) = 1241694.064223714
e(rss) = 59524270.68153899
e(r2_a) = .0148365187385228
e(ll) = -1377.380549813641
e(ll_0) = -1379.207694429356
e(rank) = 2
ECON 644 Class 5
Unpacking ̂ and t
. display e(rss)
59524271
. display e(df_r)
175
. display sqrt(e(rss)/e(df_r))
583.2141 Note: Confirms “Root MSE” in table.
. display _b[ceoten]
11.746129
. display _se[ceoten]
6.1477399
. display _b[ceoten]/_se[ceoten]
1.9106418 Note: Confirms “t” stat in table.
ECON 644 Class 5
Margins Window
1._at : ceoten = 0
2._at : ceoten = 5
3._at : ceoten = 10
4._at : ceoten = 15
5._at : ceoten = 20
6._at : ceoten = 25
7._at : ceoten = 30
8._at : ceoten = 35
9._at : ceoten = 40
Delta-method
Margin Std. Err. t P>|t| [95% Conf. Interval]
_at
1 781.9084 62.57995 12.49 0.000 658.3848 905.432
2 834.679 44.0409 18.95 0.000 747.7488 921.6093
3 887.4497 42.12832 21.07 0.000 804.2946 970.6048
4 940.2203 58.49643 16.07 0.000 824.757 1055.684
5 992.991 82.95006 11.97 0.000 829.2599 1156.722
6 1045.762 110.2335 9.49 0.000 828.1769 1263.346
7 1098.532 138.6867 7.92 0.000 824.7853 1372.279
8 1151.303 167.7153 6.86 0.000 820.2578 1482.348
9 1204.074 197.0651 6.11 0.000 815.0962 1593.051
ECON 644 Class 5
n 177 R 0.0204
2
Table Form:
Model: (1) (2) (3) (4)
salary salary salary salary
ceoten 11.75* 9.641 9.747 10.55*
(6.148) (6.536) (6.568) (6.020)
age - 5.277 5.408 1.650
(5.549) (5.589) (5.162)
grad - - 22.00 -43.43
(88.97) (82.30)
mktval - - - 0.0372***
(0.0063)
const. 772.4*** 941.4 471.5 578.1**
(65.68) (302.8) (314.0) (288.4)
Obs. 177 177 177 177
R2 0.020 0.025 0.026 0.187
Note: Standard errors in parentheses. * p<10%, ** p<5%, *** p<1%.
ECON 644 Class 5
. use "E:\UMD\ECON644\Data\[Link]"
mktval 0.0372***
(0.00637)
. eststo clear
ECON 644 Class 5
. eststo clear
mktval 0.0372***
(0.00637)
point data
o two coordinates:
longitude (horizontal) latitude (vertical)
o Example:
. list city state longitude latitude in 31/33
+------------------------------------------------------+
| city state longitude latitude |
|------------------------------------------------------|
31. | Tacoma Washington -122.4443 47.2529 |
32. | Rancho Cucamonga California -117.5931 34.1064 |
33. | Montgomery Alabama -86.3077 32.3792 |
+------------------------------------------------------+
polygon data
o a polygon is an enclosed area
o data contained in “shapefiles”
o shapefiles for the US can be found at the Census page:
[Link]
[Link]
ECON 644 Class 5
(10,40]
(4,10]
(2,4]
[1,2]
No data