Upload
doomy-jones
View
219
Download
0
Embed Size (px)
Citation preview
7/25/2019 Econometrics I 8
1/50
Part 8: Hypothesis Testing-1/50
Econometrics I
Professor William Greene
Stern School of Business
Department of Economics
7/25/2019 Econometrics I 8
2/50
Part 8: Hypothesis Testing-2/50
Econometrics I
Part 8 Interval Estimation
and Hypothesis Testing
7/25/2019 Econometrics I 8
3/50
Part 8: Hypothesis Testing-3/50
Interval Estimation
point estimator of
We ac!no"le#ge the sampling varia$ility% Estimate# sampling variance
&sampling variaility ind!"ed y
7/25/2019 Econometrics I 8
4/50
Part 8: Hypothesis Testing-#/50
Point estimate is only the $est single guess
'orm an interval( or range of plausi$le values
Plausi$le
li!ely values "ith accepta$le #egreeof pro$a$ility%
To assign pro$a$ilities( "e re)uire a #istri$ution
for the variation of the estimator%
The role of the normality assumption for
7/25/2019 Econometrics I 8
5/50
Part 8: Hypothesis Testing-5/50
*onfi#ence Interval$! the point estimate
St#%Err+$!, s)r-+./0$$123,!!4 v!
5ssume normality of for no": $!6 7+!(v!/, for the true !% 0$!2!19v! 6 7+(3,
*onsi#er a range of plausi$le values of !given the point
estimate $!% $!sampling error%
;easure# in stan#ar# error units( ?@
Aarger ?@greater pro$a$ility 0confi#enceC1 Given normality( e%g%( ?@ 3% F( ?@3%F Plausi$le range for !then is $! ?@ v!
7/25/2019 Econometrics I 8
6/50
Part 8: Hypothesis Testing-%/50
*omputing the *onfi#ence Interval
5ssume normality of for no": $!6 7+!(v!
/, for the true !%
0$!2!19v! 6 7+(3,
v! +./0$&$123,!!is not !no"n $ecause ./ must $eestimate#%
Jsing s/instea# of ./( 0$!2!19Est%0v!1 6 t+72K,%
0Proof: ratio of normal to s)r0chi2s)uare#19#f is pursue# in
your teLt%1
Jse critical values from t #istri$ution instea# of stan#ar#
normal% Will $e the same as normal if 7 M 3%
7/25/2019 Econometrics I 8
7/50Part 8: Hypothesis Testing-'/50
*onfi#ence Interval
*ritical t+%NF(/, /%F
*onfi#ence interval $ase# on t: 3%/NOF /%F @ %3F3*onfi#ence interval $ase# on normal: 3%/NOF 3% @ %3F3
7/25/2019 Econometrics I 8
8/50Part 8: Hypothesis Testing-8/50
Bootstrap *onfi#ence Interval'or a *oefficient
7/25/2019 Econometrics I 8
9/50Part 8: Hypothesis Testing-(/50
Bootstrap *I for Aeast S)uares
7/25/2019 Econometrics I 8
10/50Part 8: Hypothesis Testing-10/50
Bootstrap *I for Aeast 5$solute Deviations
7/25/2019 Econometrics I 8
11/50Part 8: Hypothesis Testing-11/50
Testing a Hypothesis Jsing
a *onfi#ence Interval
Given the range of plausi$le values
Testing the hypothesis that a coefficient e)uals
?ero or some other particular value:
Is the hypothesi?e# value in the confi#ence
interval
Is the hypothesi?e# value "ithin the range ofplausi$le values If not( reQect the hypothesis%
7/25/2019 Econometrics I 8
12/50Part 8: Hypothesis Testing-12/50
Test a Hypothesis 5$out a *oefficient
7/25/2019 Econometrics I 8
13/50Part 8: Hypothesis Testing-13/50
*lassical Hypothesis Testing
We are intereste# in using the linear regression
to support or cast #ou$t on the vali#ity of a
theory a$out the real "orl# counterpart to our
statistical mo#el% The mo#el is use# to test
hypotheses a$out the un#erlying #atagenerating process%
7/25/2019 Econometrics I 8
14/50Part 8: Hypothesis Testing-1#/50
Types of Tests
7este# ;o#els: Restriction on the parameters
of a particular mo#el
y 3& /L & O? & ( O
7onneste# mo#els: E%g%( #ifferent RHS varia$les
yt 3& /Lt& OLt23& tyt 3 & /Lt& Oyt23& "t
Specification tests:6 7+(/, vs% some other #istri$ution
7/25/2019 Econometrics I 8
15/50Part 8: Hypothesis Testing-15/50
;etho#ology
)ayesian
Prior o##s compares strength of prior $eliefs in t"o states of the
"orl#
Posterior o##s compares revise# $eliefs
Symmetrical treatment of competing i#eas
7ot generally practical to carry out in meaningful situations
*lassi"al
7ullC hypothesis given prominence
Propose to reQectC to"ar# #efault favor of alternativeC 5symmetric treatment of null an# alternative
Huge gain in practical applica$ility
7/25/2019 Econometrics I 8
16/50Part 8: Hypothesis Testing-1%/50
7eyman = Pearson ;etho#ology
'ormulate null an# alternative hypotheses
Define ReQectionC region sample evi#ence
that "ill lea# to reQection of the null hypothesis%
Gather evi#ence
5ssess "hether evi#ence falls in reQection region
or not%
7/25/2019 Econometrics I 8
17/50Part 8: Hypothesis Testing-1'/50
Inference in the Ainear ;o#el
+orm!lating hypotheses, linear restrictions as a generalframe"or!
Hypothesis Testing linear restrictions
5nalytical frame"or!: y $
&Hypothesis: 2 . 0(
!stantive restri"tions, What is a testa$le hypothesis
Su$stantive restriction on parameters
Re#uces #imension of parameter spaceImposition of restriction #egra#es estimation criterion
7/25/2019 Econometrics I 8
18/50Part 8: Hypothesis Testing-18/50
Testa$le Implications of a Theory Investors care a$out interest rates an# eLpecte#
inflation:
I $3& $/r & $O#p & e
Investors care a$out real interest rates
I c3& c/0r2#p1 & cO#p & e
7o testa$le restrictions implie#%
c3 $3( c/$/2$O( cO$O% Investors care onlya$out real interest rates
I f3& f/0r2#p1 & fO#p & e% fO
7/25/2019 Econometrics I 8
19/50Part 8: Hypothesis Testing-1(/50
The eneral inear Hypothesis, H0, - . 0
!niying depart!re point, egardless o the hypothesis4 least s.!aresis !niased
E+,
The hypothesis ma6es a "laim ao!t the pop!lation
. 0 Then4 i the hypothesis is tr!e4 E7 . 9 0
The sample statisti"4 . :ill not e.!al ;ero
T:o possiilities, . is small eno!gh to attri!te to sampling variaility . is too large e"tion region
7/25/2019 Econometrics I 8
20/50Part 8: Hypothesis Testing-20/50
5pproaches to Defining the ReQection Region
031 Imposing the restrictions lea#s to a loss of fit% R/must go #o"n% Does it go #o"n a lotC 0I%e%( significantly1%Ru
/ unrestricte# mo#el( Rr/ restricte# mo#el fit%
F - 0Ru/= Rr
/19 4 9 +03 = Ru/19072K1, F+(72K,%
0/1 Is - .close to 0 Basing the test on the #iscrepancyvector: m - .Jsing the Wald criterion: m0Uar+m,123mhas a chi2s)uare# #istri$ution "ith J #egrees of free#om
But( Uar+m, +/0$&$123,%
If "e use our estimate of /( "e get an '+(72K,( instea#% 07ote( this is $ase# on using ee90N2K1 to estimate /%1
These are the same for the linear mo#el
7/25/2019 Econometrics I 8
21/50Part 8: Hypothesis Testing-21/50
Testing 'un#amentals 2 I
I?E o a test Pro$a$ility it "ill incorrectly
reQect a trueC null hypothesis%
This is the pro$a$ility of a Type I error%
Under the null hypothesis, F(3,100) has
an F distribution with (3,100) degrees
of freedom. Even if the null is true, F
will be larger than the ! "riti"al value
of #.$ about ! of the time.
7/25/2019 Econometrics I 8
22/50
Part 8: Hypothesis Testing-22/50
Testing Proce#ures
Ho: to determine i the statisti" is @large@7ee# a Vnull #istri$ution%V
If the hypothesis is true( then the statistic "ill have a certain#istri$ution% This tells you ho" li!ely certain values are(an# in particular( if the hypothesis is true( then VlargevaluesV "ill $e unli!ely%
If the o$serve# statistic is too large( conclu#e that theassume# #istri$ution must $e incorrect an# thehypothesis shoul# $e reQecte#%
'or the linear regression mo#el "ith normally #istri$ute##istur$ances( the #istri$ution of the relevant statistic is '"ith an# 72K #egrees of free#om%
7/25/2019 Econometrics I 8
23/50
Part 8: Hypothesis Testing-23/50
Distri$ution Jn#er the 7ullDensity of F[3,100]
X
.250
.500
.750
.000
1 2 3 40
FDENSITY
7/25/2019 Econometrics I 8
24/50
Part 8: Hypothesis Testing-2#/50
5 Simulation ELperiment
sample ; 1 - 100 $matrix ; fvalues=init(1000,1,0)$proc$create ; fakelogc = rnn(-.319!,1."#3)$ %oefficients all = 0regress ; &uietl' ; ls = fakelogc %ompute regression ; rs=one,log&,logplpf,logpkpf$calc ; fstat = (rs&r*+3)+((1-rs&r*)+(n-"))$ %ompute matrix ; fvalues(i)=fstat$ ave 1000 sen*procexecute ; i= 1,1000 $ 1000 replications
istogram ; rs = fvalues ; title= tatistic for 0/#=3="=0$
7/25/2019 Econometrics I 8
25/50
Part 8: Hypothesis Testing-25/50
Simulation Results
%& out"omes to the right of
#.$ in this run of thee'periment.
7/25/2019 Econometrics I 8
26/50
Part 8: Hypothesis Testing-2%/50
Testing 'un#amentals 2 II
PABE o a test the pro$a$ility that it "ill
correctly reQect a false nullC hypothesis This is 3 = the pro$a$ility of a Type II error%
The po"er of a test #epen#s on the specific
alternative%
7/25/2019 Econometrics I 8
27/50
Part 8: Hypothesis Testing-2'/50
Po"er of a Test
ull *ean + 0. e-e"t if observed mean /1. or 2 1..4rob(e-e"t null5mean+0) + 0.0
4rob(e-e"t null5mean+.)+0.0$0#
4rob(e-e"t null5mean+1)+0.1$00. 6n"reases as the (alternative) mean rises.
BE TA
.084
.168
.251
.335
.419
.000
-3 -2 -1 0 1 2 3 4 5-4
N2 N0 N1
V
a
ria
b
le
7/25/2019 Econometrics I 8
28/50
Part 8: Hypothesis Testing-28/50
Test Statistic
'or the fit measures( use a normali?e# measure of
the loss of fit:
( )( )
( )
( )
r rr
r r
r r
0 sin"e
and
0 sin"e
/ /
u r / /u r/
u
/ /u uu
yy yy
u u
u u
u u
R 2R 9 '+(n 2K, R R
32R 9 072K1
ften useful
R 32 R 32S S
Insert these in ' an# it $ecomes
9 '+(n2K,
9072K1
e e e e
e e e ee e e e
e e
7/25/2019 Econometrics I 8
29/50
Part 8: Hypothesis Testing-2(/50
Test Statistics
+orming test statisti"s,
'or #istance measures use Wal# type of #istance
measure( W m+Est%Uar0m1,23m
n important relationship et:een t and +
'or a single restriction( mr&2 q% The variance
is rX0Uar+,1r
The #istance measure is m9 stan#ar# error of m%
7/25/2019 Econometrics I 8
30/50
Part 8: Hypothesis Testing-30/50
n important relationship et:een t and +
'or a single restriction( '+3(72K, is the s)uare of the tratio%
#
7hi 89uared:;< = ;F
7hi s9uared: >< = ( >)
where the two "hi/s9uared variables are independent.
6f ; + 1, i.e., testing a single restri"tion,
7hi 89uared:1< =1F7hi s9uared: >< = ( >)
(:0,1< = ( >)
:0,1)
=
7/25/2019 Econometrics I 8
31/50
Part 8: Hypothesis Testing-31/50
5pplication
Time series regression(
AogG 3& /logY & OlogPG
& logP7* & FlogPJ* & logPPT
& NlogP7 & 8logPD & logPS &
Perio# 3 2 3F% 7ote that all coefficients in themo#el are elasticities%
7/25/2019 Econometrics I 8
32/50
Part 8: Hypothesis Testing-32/50
'ull ;o#el----------------------------------------------------------------------r*inar' least s&uares regression ............2=2 4ean = .39#99 tan*ar* *eviation = .#"5!5 6umer of oservs. = 34o*el si7e 8arameters = 9
egrees of free*om = #!:esi*uals um of s&uares = .005
7/25/2019 Econometrics I 8
33/50
Part 8: Hypothesis Testing-33/50
Test 5$out ne ParameterIs the price of pu$lic transportation really relevant H: %
*onfi#ence interval: $ t0%F(/N1 Stan#ar# error
%33FN3 /%F/0%N8F1
%33FN3 %33/N 02%FFFN (%/N81
*ontains %% Do not reQect hypothesis
Regression fit if #rop Without APPT( R2s)uare# %FNO
*ompare R/( "as %F(
'03(/N1 +0%F 2 %FNO193,9+032%F190O21,
/%38N 3%N// 0"ith some roun#ing #ifference1
7/25/2019 Econometrics I 8
34/50
Part 8: Hypothesis Testing-3#/50
Hypothesis Test: Sum of *oefficients 3----------------------------------------------------------------------r*inar' least s&uares regression ............2=2 4ean = .39#99 tan*ar* *eviation = .#"5!5 6umer of oservs. = 34o*el si7e 8arameters = 9
egrees of free*om = #!:esi*uals um of s&uares = .005
7/25/2019 Econometrics I 8
35/50
Part 8: Hypothesis Testing-35/50
Imposing the Restriction----------------------------------------------------------------------2inearl' restricte* regression2=2 4ean = .39#959 tan*ar* *eviation = .#"5!!9" 6umer of oservs. = 34o*el si7e 8arameters = 5
7/25/2019 Econometrics I 8
36/50
Part 8: Hypothesis Testing-3%/50
oint HypothesesJoint hypothesis: Income elasticity = +1, Own price elasticity = -1.
The hypothesis implies that logG = 1+ logY log!g + "log!#$ + ...
%trategy: &egress logG logY + log!g on the other 'aria(les an)
$ompare the s*ms o s*ares
Kit tMo restrictions impose*:esi*uals um of s&uares = .0#55!!it :-s&uare* = .99!900Inrestricte*:esi*uals um of s&uares = .00531it :-s&uare* = .9901
= ./0233 - .//44516706 7 .//4451752-866 = 51.338841
The critical or 849 with 0,03 )egrees o ree)om is 5.54".
The hypothesis is reecte).
7/25/2019 Econometrics I 8
37/50
Part 8: Hypothesis Testing-3'/50
Basing the Test on R/
5fter $uil#ing the restrictions into the mo#el an# computing
restricte# an# unrestricte# regressions: Base# on R/s(
' 00%F3F 2 %N19/190032%F3F190O211
2O%FN33 0Z1
WhatVs "rong The unrestricte# mo#el use# AHS logG%
The restricte# one use# logG2logY% The calculation is safeusing the sums of s)uare# resi#uals%
7/25/2019 Econometrics I 8
38/50
Part 8: Hypothesis Testing-38/50
Wal# Distance ;easure
Testing more generally a$out a single parameter%
Sample estimate is $!
Hypothesi?e# value is !
Ho" far is !from $! If too far( the hypothesis is
inconsistent "ith the sample evi#ence%
;easure #istance in stan#ar# error units
t 9
7/25/2019 Econometrics I 8
39/50
Part 8: Hypothesis Testing-3(/50
The Wal# Statistic
-1
Most test statistics are Wald distance measures
W = (random vector - hyothesi!ed value"# times
[$ariance of di%erence] times
(random vector - hyothesi!ed value"
0 0 -1 0
= &ormali!ed distance measure
= ( - " [$ar( - "] ( - "
Distri'uted as chi-suared() " if (1" the distance isnormally distri'uted and (*" the variance matri+ is
the true one, not the esti
!
mate
7/25/2019 Econometrics I 8
40/50
Part 8: Hypothesis Testing-#0/50
Ro$ust Tests
The Wal# test generally "ill 0"hen properly
constructe#1 $e more ro$ust to failures of the
narro" mo#el assumptions than the t or '
Reason: Base# on ro$ustC variance estimators
an# asymptotic results that hol# in a "i#e range
of circumstances%
5nalysis: Aater in the course = after #evelopingasymptotics%
7/25/2019 Econometrics I 8
41/50
Part 8: Hypothesis Testing-#1/50
Particular *asesSome particular cases:ne coefficient e)uals a particular value: ' +0$ 2 value1 9 Stan#ar# error of $ ,/ s)uare of familiar t ratio%
Relationship is ' + 3( #%f%, t/+#%f%,5 linear function of coefficients e)uals a particular value
0linear function of coefficients 2 value1/
' 2222222222222222222222222222222222222222222222222222 Uariance of linear function
7ote s)uare of #istance in numeratorSuppose linear function is !"!$!Uariance is !l"!"l*ov+$!($l,
This is the Wal# statistic% 5lso the s)uare of the some"hatfamiliar t statistic%
Several linear functions% Jse Wal# or '% Aoss of fit measures may $e easier tocompute%
7/25/2019 Econometrics I 8
42/50
Part 8: Hypothesis Testing-#2/50
Hypothesis Test: Sum of *oefficients
?o the three aggregate pri"e elasti"ities sum to @eroA
B0C$ C& C + 0
&+ :0, 0, 0, 0, 0, 0, 1, 1, 1
7/25/2019 Econometrics I 8
43/50
Part 8: Hypothesis Testing-#3/50
Wal# Test
7/25/2019 Econometrics I 8
44/50
Part 8: Hypothesis Testing-##/50
Jsing the Wal# Statistic--E 4atrix ; : = C0,1,0,0,0,0,0,0,0 +
0,0,1,0,0,0,0,0,0F$--E 4atrix ; & = C1+-1F$--E 4atrix ; list ; m = :
7/25/2019 Econometrics I 8
45/50
Part 8: Hypothesis Testing-#5/50
5pplication: *ost 'unction
7/25/2019 Econometrics I 8
46/50
Part 8: Hypothesis Testing-#%/50
Regression Results----------------------------------------------------------------------r*inar' least s&uares regression ............2=% 4ean = 3.0!1# tan*ar* *eviation = 1."#!3 6umer of oservs. = 154o*el si7e 8arameters = 9 egrees of free*om = 1"9:esi*uals um of s&uares = #.313 tan*ar* error of e = .1311
it :-s&uare* = .9931" *>uste* :-s&uare* = .99#!!--------?-------------------------------------------------------------@arialeA %oefficient tan*ar* Brror t-ratio 8CADAEtF 4ean of G--------?-------------------------------------------------------------%onstantA .##53 3.150#" 1."" .10#3 OA -.#10 .#1!! -.95 .33"5 ".#09 2A -.533
7/25/2019 Econometrics I 8
47/50
Part 8: Hypothesis Testing-#'/50
Price Homogeneity: nly Price Ratios ;atter
/& O& 3% N& 8& %----------------------------------------------------------------------2inearl' restricte* regression....................2=% 4ean = 3.0!1# tan*ar* *eviation = 1."#!3 6umer of oservs. = 154o*el si7e 8arameters = ! egrees of free*om = 11:esi*uals um of s&uares = #.5#
tan*ar* error of e = .13!3it :-s&uare* = .99#3:estrictns. C #, 1"9F (pro) = 5.(.0003)6ot using 2 or no constant. :s&r* L ma' e 0--------?-------------------------------------------------------------@arialeA %oefficient tan*ar* Brror t-ratio 8CADAEtF 4ean of G--------?-------------------------------------------------------------%onstantA -!.#"0!5
7/25/2019 Econometrics I 8
48/50
Part 8: Hypothesis Testing-#8/50
Imposing the RestrictionsAl"er#a"i$el%& '()*+"e ",e re-"ri'"e re/re--i(# b% '(#$er"i#/ "( *ri'e ra"i(-a#I)*(-i#/ ",e re-"ri'"i(#- ire'"l%. T,i- i- a re/re--i(# ( l(/'* (# l(/**&l(/*l* e"'.----------------------------------------------------------------------r*inar' least s&uares regression ............2=2%8 4ean = -.319 tan*ar* *eviation = 1."#3
6umer of oservs. = 154o*el si7e 8arameters = ! egrees of free*om = 11:esi*uals um of s&uares = #.5# (restricte*):esi*uals um of s&uares = #.313 (unrestricte*)--------?-------------------------------------------------------------@arialeA %oefficient tan*ar* Brror t-ratio 8CADAEtF 4ean of G--------?-------------------------------------------------------------%onstantA -!.#"0!5
7/25/2019 Econometrics I 8
49/50
Part 8: Hypothesis Testing-#(/50
Wal# Test of the Restrictions
*hi s)uare# @'Mal* ; fn1 = k ? l ? f - 1 ; fn# = &k ? &l ? &f J 0 $-----------------------------------------------------------K2 proce*ure. Bstimates an* stan*ar* errorsfor nonlinear functions an* >oint test ofnonlinear restrictions.Kal* tatistic = 1!.039!58ro. from %i-s&uare*C #F = .000#0--------?--------------------------------------------------@arialeA %oefficient tan*ar* Brror +t.Br. 8CARAE7F--------?--------------------------------------------------ncn(1)A -1.5!"
7/25/2019 Econometrics I 8
50/50
Test of Homotheticity
*ross Pro#uct Terms omotetic 8ro*uction/ T!= T5= T9= 0.
Kit linearit' omogeneit' in prices alrea*' impose*, tis is T= T!= 0.
-----------------------------------------------------------K2 proce*ure. Bstimates an* stan*ar* errors
for nonlinear functions an* >oint test ofnonlinear restrictions.Kal* tatistic = #.!1508ro. from %i-s&uare*C #F = .#!"0--------?--------------------------------------------------@arialeA %oefficient tan*ar* Brror +t.Br. 8CARAE7F--------?--------------------------------------------------ncn(1)A -.0#9" .0#1# -1.390 .1""ncn(#)A -.00"# .0#3" -.19 .5"1
--------?--------------------------------------------------
De test Moul* pro*uce = ((#.90"90 J #.5#)+1)+(#.5#+(15-!))= 1.#5