Professional Documents
Culture Documents
wk03 - Hypothesis Testing - Hand Written Notes 170822
wk03 - Hypothesis Testing - Hand Written Notes 170822
Model Speciifcation
Yiran Xie
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 1 / 32
Table of contents
1. Hypothesis Testing
Hypothesis test of single restriction: Review
Hypothesis test of multiple linear restrictions
2. Model Specification
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 2 / 32
Reference:
Chapter 7.2.1 and 4.7.4, Microecononmetrics: Methods and Applications,
Cameron and Trivedi (2005)
Chapter 3.4, Microecononmetrics Using Stata, Cameron and Trivedi (2009)
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 3 / 32
Hypothesis Testing
H0 :β = β0
∕ β0
H1 :β =
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 4 / 32
Hypothesis Testing Hypothesis test of single restriction: Review
Suppose we want to test if our estimated β̂j (the coefficient of the j-th
regressor) is significantly different from a constant β0
Define σβ̂ to be the asymptotic standard deviation of β̂j . Then
a
β̂j ∼ N [β, σβ̂2 ] for unknown β
β̂j − β a
⇒ ∼ N [0, 1] standardizing
σβ̂
β̂j − β0 a
⇒ zj = ∼ N [0, 1] under H0 : β = β0
σβ̂
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 5 / 32
Hypothesis Testing Hypothesis test of single restriction: Review
To implement this test, replace σβ̂ by sβ̂ , the standard error of β̂.
Because we do not know the true value of σβ̂
This makes no difference asymptotically (so still N [0, 1] if N is large; when N
is small, use t-distribution instead).
Test statistic: Wald z-statistic
β̂j − β0 a
zj = ∼ N [0, 1] under H0 : β = β0
sβ̂
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 6 / 32
Hypothesis Testing Hypothesis test of single restriction: Review
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 7 / 32
Hypothesis Testing Hypothesis test of single restriction: Review
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 8 / 32
Hypothesis Testing Hypothesis test of single restriction: Review
Confidence interval
β̂ ± zα/2 × sβ̂
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 9 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Joint Hypothesis?
Question: What is the difference between a Joint Hypothesis Testing and the
standard Single Hypothesis Testing?
Answer: Joint Hypothesis tests multiple conjectures
Joint Hypothesis contains multiple equal signs
Model Y = β0 + β1 x1 + β2 x2 + u
Examples of Single Hypothesis Testing
H0 : β1 = 0 versus H1 : β1 ∕= 0
H0 : β1 − β2 = 3 versus H1 : β1 − β2 ∕= 3
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 10 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
H0 : β2 = 0 and β3 = 0
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 11 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
H0 : Rβ = r against H1 : Rβ ∕= r
or Rβ = r .
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 12 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Quick practice:
yi = β0 + β1 x1i + β2 x2i + ... + βK xKi + ui for i = 1, ..., N
Test H0 : β0 = 0, 2β1 + 3β2 = 1 against H1 : β0 ∕= 0 or 2β1 + 3β2 ∕= 1
What are R and r ?
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 13 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Quick practice:
yi = β0 + β1 x1i + β2 x2i + ... + βK xKi + ui for i = 1, ..., N
Test H0 : β0 = 0, 2β1 + 3β2 = 1 against H1 : β0 ∕= 0 or 2β1 + 3β2 ∕= 1
What are R and r ?
Answers.
! "
1 0 0 0 ··· 0
R=
0 2 3 0 ··· 0
! "
0
r=
1
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 13 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
z ∼ N [0, IN ] ⇒ z ′ z ∼ χ2 (N)
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 14 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 15 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 16 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 17 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 18 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 19 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
W = (R β̂ − r )′ [R V̂ [β̂]R ′ ]−1 (R β̂ − r )
! "! "
- . 1 0 1
= 1 0.1 = 1.19
0 19 0.1
a
Since W ∼ χ2 (2) under H0 and W < χ20.05 (2) = 5.991, we cannot reject the null
hypothesis.
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 20 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
χ2 distribution table
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 21 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
How do I have Stata report normal tail areas and inverse normal tail
areas?
To compute the left tail area for a given z value, use
display normal(z)
where z is the value of interest.
To compute the inverse tail area for an area equal to p, use
display invnormal(p)
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 22 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
How do I use Stata to calculate tail areas and critical values for the t
distribution?
ttail(df,t): df is degrees of freedom and t is the test statistic.
display ttail(5,2) will return the upper tail area (to the right of 2) of a t
distribution with 5 degrees of freedom.
invttail(df,p): p is a right tail area from a t distribution with df degrees
of freedom.
display invttail(5,.05) will return the critical value from a t distribution
with 5 degrees of freedom such that the area to the right of the value is 0.05
Other distributions: chi2tail(df, c), invchi2tail(df, p),
Ftail(df1 ,df2 ,F), invFtail(df1 ,df2 ,p)
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 23 / 32
Hypothesis Testing Hypothesis test of multiple linear restrictions
Stata example
H0 :βprivate = 0, βchronic = 0
H1 : at least one of βprivate ∕= 0, βchronic ∕= 0
. t e s t ( p r i v a t e = 0) ( c h r o n i c = 0)
( 1) p r i v a t e = 0
( 2) c h r o n i c = 0
F (2 , 4407) = 165.11
Prob > F = 0 . 0 0 0 0
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 25 / 32
Model Specification
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 26 / 32
Model Specification
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 27 / 32
Model Specification
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 28 / 32
Model Specification
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 29 / 32
Model Specification
y = X β + zα + v
y = X β + (zα + v )
β̂ ∗ = (X ′ X )−1 X ′ (X β + zα + v )
= β + (X ′ X )−1 X ′ zα + (X ′ X )−1 X ′ v
= β + (N −1 X ′ X )−1 (N −1 X ′ z)α + (N −1 X ′ X )−1 (N −1 X ′ v )
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 30 / 32
Model Specification
N −1 X ′ v converge in probability to 0
! p
N −1 X ′ v = 1
N i xi vi → E [xi vi ] = 0 because xi and vi are independent
/ p
N −1 X ′ z = 1
N i xi zi → E [xi zi ] it is not 0 if xi and zi are correlated
⇒ plim β̂ ∗ = β + δα
where
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 31 / 32
Model Specification
Main Properties
The sign of the bias depends two factors: α and δ
α > 0 because wife’s education has a positive effect on family income
δ = Cov (HEDU, WEDU)/Var (HEDU) > 0 because husband/wife education is
positively correlated
(Assortative Matching: couples often have similar schooling levels)
We conclude that the bias is positive
If correlation/covariance were 0: Cov (xi , zi ) = 0 No Bias!
Yiran Xie (School of Economics, University of Sydney) Basic Regression Analysis August 17, 2022 32 / 32