Vous êtes sur la page 1sur 37

Econ 424/Amath 540

Hypothesis Testing in the CER Model


Eric Zivot
July 17, 2012
Hypothesis Testing
1. Specify hypothesis to be tested
1
0
: null hypothesis versus. 1
1
: alternative hypothesis
2. Specify signicance level of test
level = Pr(Reject 1
0
|1
0
is true)
3. Construct test statistic, T, from observed data
4. Use test statistic T to evaluate data evidence regarding 1
0
|T| is big evidence against 1
0
|T| is small evidence in favor of 1
0
Decide to reject 1
0
at specied signicance level if value of T falls in the
rejection region
T rejection region reject 1
0
Usually the rejection region of T is determined by a critical value, c, such that
|T| c reject 1
0
|T| c do not reject 1
0
Decision Making and Hypothesis Tests
Reality
Decision 1
0
is true 1
0
is false
Reject 1
0
Type I error No error
Do not reject 1
0
No error Type II error
Signicance Level of Test
level = Pr(Type I error)
Pr(Reject 1
0
|1
0
is true)
Goal: Constuct test to have a specied small signicance level
level = 5% or level = 1%
Power of Test
1 Pr(Type II error)
= Pr(Reject 1
0
|1
0
is false)
Goal: Construct test to have high power
Problem: Impossible to simultaneously have level 0 and power 1. As level
0 power also 0.
Hypothesis Testing in CER Model
v
it
= j
i
+ c
it
t = 1, , T; i = 1, .
c
it
iid .(0, o
2
i
)
cov(c
it
, c
)t
) = o
i)
, cor(c
it
, c
)t
) = j
i)
cov(c
it
, c
)c
) = 0 t 6= c, for all i, )
Test for specic value
1
0
: j
i
= j
0
i
vs. 1
1
: j
i
6= j
0
i
1
0
: o
i
= o
0
i
vs. 1
1
: o
i
6= o
0
i
1
0
: j
i)
= j
0
i)
vs. 1
1
: j
i)
6= j
0
i)
Test for sign
1
0
: j
i
= 0 vs. 1
1
: j
i
0 or j
i
< 0
1
0
: j
i)
= 0 vs. 1
1
: j
i)
0 or j
i)
< 0
Test for normal distribution
1
0
: v
it
iid .(j
i
, o
2
i
)
1
1
: v
it
not normal
Test for no autocorrelation
1
0
: j
)
= corr(v
it
, v
i,t)
) = 0, ) 1
1
1
: j
)
= corr(v
it
, v
i,t)
) 6= 0 for some )
Test of constant parameters
1
0
: j
i
, o
i
and j
i)
are constant over entire sample
1
1
: j
i
o
i
or j
i)
changes in some sub-sample
Denition: Chi-square random variable and distribution
Let Z
1
, . . . , Z
q
be iid .(0, 1) random variables. Dene
A = Z
2
1
+ + Z
2
q
Then
A
2
(q)
q = degrees of freedom (d.f.)
Properties of
2
(q) distribution
A 0
1[A] = q

2
(q) normal as q
R functions
rchisq(): simulate data
dchisq(): compute density
pchisq(): compute CDF
qchisq(): compute quantiles
Denition: Students t random variable and distribution with q degrees
of freedom
Z .(0, 1), A
2
(q)
Z and A are independent
T =
Z
q
Aq
t
q
q = degrees of freedom (d.f.)
Properties of t
q
distribution:
1[T] = 0
skew(T) = 0
kurt(T) =
3q 6
q 4
, q 4
T .(0, 1) as q (q 60)
R functions
rt(): simulate data
dt(): compute density
pt(): compute CDF
qt(): compute quantiles
Test for Specic Coecient Value
1
0
: j
i
= j
0
i
vs. 1
1
: j
i
6= j
0
i
1. Test statistic
t
j
i
=j
0
i
=
j
i
j
0
i
c
SE( j
i
)
Intuition:
If t
j
i
=j
0
i
0 then j
i
j
0
i
, and 1
0
: j
i
= j
0
i
should not be rejected
If |t
j
i
=j
0
i
| 2, say, then j
i
is more than 2 values of
c
SE( j
i
) away from
j
0
i
. This is very unlikely if j
i
= j
0
i
, so 1
0
: j
i
= j
0
i
should be rejected.
Distribution of t-statistic under 1
0
Under the assumptions of the CER model, and 1
0
: j
i
= j
0
i
t
j
i
=j
0
i
=
j
i
j
0
i
c
SE( j
i
)
t
T1
where
j
i
=
1
T
T
X
t=1
v
it
,
c
SE( j
i
) =
o
i

T
, o
i
=
v
u
u
u
t
1
T 1
T
X
t=1
(v
it
j
i
)
2
t
T1
= Students t distribution with
T 1 degrees of freedom (d.f.)
Remarks:
t
T1
is bell-shaped and symmetric about zero (like normal) but with fatter
tails than normal
d.f. = sample size - number of estimated parameters. In CER model there
is one estimated parameter, j
i
, so df = T 1
For T 60, t
T1
' .(0, 1). Therefore, for T 60
t
j
i
=j
0
i
=
j
i
j
0
i
c
SE( j
i
)
' .(0, 1)
2. Set signicance level and determine critical value
Pr(Type I error) = 5%
Test has two-sided alternative so critical value, c
.025
, is determined using
Pr(|t
T1
| c
.025
) = 0.05 c
.025
= q
t
T1
.025
= q
t
T1
.975
where q
t
T1
.975
= 97.5% quantile of Student-t distribution with T 1 degrees of
freedom.
3. Decision rule:
reject 1
0
: j
i
= j
0
i
in favor of 1
1
: j 6= j
0
i
if
|t
j
i
=j
0
i
| c
.975
Useful Rule of Thumb:
If T 60 then c
.975
2 and the decision rule is
Reject 1
0
: j
i
= j
0
i
at 5% level if
|t
j
i
=j
0
i
| 2
4. P-Value of two-sided test
signicance level at which test is just rejected
= Pr(|t
T1
| t
j
i
=j
0
i
)
= Pr(t
T1
< t
j
i
=j
0
i
) + Pr(t
T1
t
j
i
=j
0
i
)
= 2 Pr(t
T1
|t
j
i
=j
0
i
|)
= 2 (1 Pr(t
T1
|t
j
i
=j
0
i
|))
Decision rule based on P-Value
Reject 1
0
: j
i
= j
0
i
at 5% level if
P-Value < 5%
For T 60
P-value = 2 Pr(: |t
j
i
=j
0
i
|), : .(0, 1)
Tests based on CLT
Let

0 denote an estimator for 0. In many cases the CLT justies the asymptotic
normal distribution

0 .(0, se(

0)
2
)
Consider testing
1
0
: 0 = 0
0
vs. 1
1
: 0 6= 0
0
Result: Under 1
0
,
t
0=0
0
=

0 0
0
c
se(

0)
.(0, 1)
for large sample sizes.
Example: In the CER model, for large enough T the CLT gives
o
i
.(o
i
, S1( o
i
)
2
)
S1( o
i
) =
o
i

2T
and
j
i)
.(j
i)
, S1( j
i)
)
2
)
S1( j
i)
) =
q
1 j
2
i)

T
Rule-of-thumb Decision Rule
Let Pr(Type I error)= 5%. Then reject
1
0
: 0 = 0
0
vs. 1
1
: 0 6= 0
0
at 5% level if
|t
0=0
0
| =

0 0
0
c
se(

0)

2
Relationship Between Hypothesis Tests and Condence Intervals
1
0
: j
i
= j
0
i
vs. 1
1
: j
i
6= j
0
i
level = 5%
c
.975
= q
t
T1
.975
2 for T 60
t
j
i
=j
0
i
=
j
i
j
0
i
c
SE( j
i
)
Reject at 5% level if |t
j
i
=j
0
i
| 2
Approximate 95% condence interval for j
i
j
i
= 2
c
SE( j
i
)
= [ j
i
2
c
SE( j
i
), j
i
+ 2
c
SE( j
i
)]
Decision: Reject 1
0
: j
i
= j
0
i
at 5% level if j
0
i
does not lie in 95% condence
interval.
Test for Sign
1
0
: j
i
= 0 vs. 1
1
: j
i
0
1. Test statistic
t
j
i
=0
=
j
i
c
SE( j
i
)
Intuition:
If t
j
i
=j
0
i
0 then j
i
0, and 1
0
: j
i
= 0 should not be rejected
If t
j
i
=j
0
i
0, then this is very unlikely if j
i
= 0, so 1
0
: j
i
= 0 vs.
1
1
: j
i
0 should be rejected.
2. Set signicance level and determine critical value
Pr(Type I error) = 5%
One-sided critical value c is determined using
Pr(t
T1
c
.05
) = 0.05
c
.05
= q
t
T1
.95
where q
t
T1
.95
= 95% quantile of Student-t distribution with T 1 degrees of
freedom.
3. Decision rule:
Reject 1
0
: j
i
= 0 vs. 1
1
: j
i
0 at 5% level if
t
j
i
=0
q
t
T1
.95
Useful Rule of Thumb:
If T 60 then q
t
T1
.95
q
:
.95
= 1.645 and the decision rule is
Reject 1
0
: j
i
= 0 vs. 1
1
: j
i
0 at 5% level if
t
j
i
=0
1.645
4. P-Value of test
signicance level at which test is just rejected
= Pr(t
T1
t
j
i
=0
)
= Pr(Z t
j
i
=0
) for T 60
Test for Normal Distribution
1
0
: v
t
iid .(j, o
2
)
1
1
: v
t
not normal
1. Test statistic (Jarque-Bera statistic)
JB =
T
6

[
skew
2
+
(
d
kurt 3)
2
4
!
See R package tseries function jarque.bera.test
Intuition
If v
t
iid .(j, o
2
) then
[
skew(v
t
) 0 and
d
kurt(v
t
) 3 so that JB 0.
If v
t
is not normally distributed then
[
skew(v
t
) 6= 0 and/or
d
kurt(v
t
) 6= 3
so that JB 0
Distribution of JB under 1
0
If 1
0
: v
t
iid .(j, o
2
) is true then
JB
2
(2)
where
2
(2) denotes a chi-square distribution with 2 degrees of freedom (d.f.).
2. Set signicance level and determine critical value
Pr(Type I error) = 5%
Critical value c is determined using
Pr(
2
(2) c) = 0.05
c = q

2
(2)
.95
6
where q

2
(2)
.95
6 95% quantile of chi-square distribution with 2 degrees of
freedom.
3. Decision rule:
Reject 1
0
: v
t
iid .(j, o
2
)
at 5% level if JB 6
4. P-Value of test
signicance level at which test is just rejected
= Pr(
2
(2) JB)
Test for No Autocorrelation
Recall, the j
tI
lag autocorrelation for v
t
is
j
)
= cor(v
t
, v
t)
)
=
cov(v
t
, v
t)
)
var(v
t
)
Hypotheses to be tested
1
0
: j
)
= 0, for all ) = 1, . . . , q
1
1
: j
)
6= 0 for some )
1. Estimate j
)
using sample autocorrelation
j
)
=
1
T
P
T
t=)+1
(v
t
j)(v
t)
j)
1
T
P
T
t=1
(v
t
j)
2
Result: Under 1
0
: j
)
= 0 for all ) = 1, . . . , q, if T is large then
j
)
.

0,
1
T

for all ) 1
SE( j
)
) =
1

T
2. Test Statistic
t
j
)=0
=
j
)
SE( j
)
)
=

T j
)
and 95% condence interval
j
)
2
1

T
3. Decision rule
Reject 1
0
: j
)
= 0 at 5% level
if |t
j
)=0
| =

T j
)

2
That is, reject if
j
)

2

T
or j
)
<
2

T
Diagnostics for Constant Parameters
1
0
: j
i
is constant over time vs. 1
1
: j
i
changes over time
1
0
: o
i
is constant over time vs. 1
1
: o
i
changes over time
1
0
: j
i)
is constant over time vs. 1
1
: j
i)
changes over time
Remarks
Formal test statistics are available but require advanced statistics
See R package strucchange
Informal graphical diagnostics: Rolling estimates of j
i
, o
i
and j
i)
Rolling Means
Idea: compute estimate of j
i
over rolling windows of length a < T
j
it
(a) =
1
a
a1
X
)=0
v
it)
=
1
a
(v
it
+ v
it1
+ + v
ita+1
)
R function (package zoo)
rollapply
If 1
0
: j
i
is constant is true, then j
it
(a) should stay fairly constant over
dierent windows.
If 1
0
: j
i
is constant is false, then j
it
(a) should uctuate across dierent
windows
Rolling Variances and Standard Deviations
Idea: Compute estimates of o
2
i
and o
i
over rolling windows of length a < T
o
2
it
(a) =
1
a 1
a1
X
)=0
(v
it)
j
it
(a))
2
o
it
(a) =
q
o
2
it
(a)
If 1
0
: o
i
is constant is true, then o
it
(a) should stay fairly constant over
dierent windows.
If 1
0
: o
i
is constant is false, then o
it
(a) should uctuate across dierent
windows
Rolling Covariances and Correlations
Idea: Compute estimates of o
)I
and j
)I
over rolling windows of length a < T
o
)I,t
(a) =
1
a 1
a1
X
i=0
(v
)ti
j
)
(a))(v
Iti
j
I
(a))
j
)I,t
(a) =
o
)I,t
(a)
o
)t
(a) o
It
(a)
If 1
0
: j
)I
is constant is true, then j
)I,t
(a) should stay fairly constant over
dierent windows.
If 1
0
: j
)I
is constant is false, then j
)I,t
(a) should uctuate across dierent
windows

Vous aimerez peut-être aussi