Professional Documents
Culture Documents
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
Overview on:
I
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
We assessed that jvar (bj ) has approximately standard normal distribution (due to Central Limit
j
Theorem), then the hypothesis on single parameters j of the regression models may be verified
using the test statistic z or t (the latter is used when 2 is unknown).
The confidence interval for parameter j may be derived following the usual approach, then is
defined as {bj 1.96 s.e.(bj )}. This holds for each of the parameters 1 , 2 , ..., k .
Example test-STR
The estimated models were:
i =
Test
i = 696
Test
(8.7)
689.9
2.28 STRi
(10.4)
(0.52)
1.1 STRi
(0.43)
0.65 PctELi
(0.031)
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
b2 0
s.e.(b2 )
t3 =
b3 0
s.e.(b3 )
Which is the probability to reject the null, even a true null? Which is thus the first type error
probability? (It should be equal to anyway)
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
[|t2 | > 1.96, |t3 | > 1.96] + PrH0 [|t2 | > 1.96, |t3 | 1.96] +
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
2 (Bonferroni approach);
I to consider a different test statistic, involving at the same time more than one hypothesis on
different parameters (the test statistic F).
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
If t1 and t2 are independent t1 ,t2 0, then in large samples the test F expression becomes:
1
2
1 2
2
= (t1 + t2 )
2
The F test statistic in large samples is the average of the two test statistic t.
Stata software example
The Stata statistical software requires the command test after regression estimation to apply test
statistic F to verify every null hypothesis. We verify the multiple hypothesis for the significance of
the regression coefficients related to the covariates STR e EXPN.
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
Number of obs
F( 3,
416)
Prob > F
R-squared
Root MSE
=
=
=
=
=
420
147.20
0.0000
0.4366
14.353
-----------------------------------------------------------------------------|
Robust
testscr |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------str | -.2863992
.4820728
-0.59
0.553
-1.234001
.661203
expn_stu |
.0038679
.0015807
2.45
0.015
.0007607
.0069751
pctel | -.6560227
.0317844
-20.64
0.000
-.7185008
-.5935446
_cons |
649.5779
15.45834
42.02
0.000
619.1917
679.9641
-----------------------------------------------------------------------------NOTE
test str expn_stu;
( 1)
( 2)
str = 0.0
expn_stu = 0.0
F(
2,
416) =
Prob > F =
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
0
2
3 0
I H0 : ~2 =
. = .
.. ..
k
0
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
~1
~=
~2
In this situation ~1 and ~2 are vectors of order (k1 1) and ((k k1 ) 1), respectively, and the
null hypothesis may involve the significance of the parameters included in one of the sub-vectors.
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
~ is a (1 k) matrix.
Where ~r = 0, q = 1 then R
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
~ is a (1 k) matrix.
Where ~r = j,0 , q = 1 then R
[3]- H0 : 2 + 3 = 1
~ =
R
~ is a (1 k) matrix.
Where ~r = 1, q = 1 then R
[4]- H0 : 2 = 3 o H0 : 2 3 = 0
~ =
R
Where ~r = 0 and q = 1.
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
~2 = .
..
k
~ =
R
~0
~Ik1
0
0
= .
..
0
0
0
1
0
0
1
0
.
.
.
0
0
.
.
.
0
0
.
.
.
0
..
.
.
.
.
0
0
.
.
.
1
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
var (Rb)
=
=
R
h
i
h
i
T
T T
E (Rb R)(Rb R)
= E R(b )(b ) R
h
i
T
T
T
2
T
1 T
RE (b )(b ) R = Rvar (b)R = R(X X ) R
~
b is a function of ~
u then the sampling distribution of Rb depends on the distribution of ~
u which is
assumed u N(0, 2 ). Thus:
b
Rb
Rb R
N(, (X X )
2
)
1
N(R, R(X X )
2
N(0, R(X X )
R )
R )
R )
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
x N(0, )
N(0, 1)
x2
2
R(X X )
i1
(Rb r ) (q)
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
h
i
2
T
1 T 1
s R(X X ) R
(Rb r )/q F (q, n k)
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
Rb =
b
1
.
.
.
0
.
.
bj .
bk
= bj
R(X X )
c11
..
.
cjj
..
.
ckk
0
.
.
.
1
.
.
.
0
= cjj
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
F =
Or: t =
F =
bj
s.e.(bj )
bj2
s 2 cjj
bj2
F (1, n k)
var (bj )
t(n k), this is the test t for the hypothesis on the significance of the
parameter j .
[2]- H0 : j = 1
This test is similar to the previous one, then:
t=
bj 1
t(n k)
s.e.(bj )
F =
(bj 1)2
var (bj )
Where bj 1 = Rb r .
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
b3
0
.
..
bk
Rb =
= b2 b3
Furthermore r = 1.
c11
c21
c31
0
.
..
R(X X )
c12
c22
c32
.
.
.
c33
.
.
.
0
1
1
.
..
0
ckk
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
(b2 b3 1)2
(b2 b3 1)2
=
F (1, n k)
s 2 (c22 2c23 + c33 )
var (b2 ) 2cov (b2 b3 ) + var (b3 )
(b2 b3 1)
t= p
t(n k)
var (b2 b3 )
p
The confidence interval for 2 3 is [(b2 b3 ) t0.025 var (b2 b3 )].
[4]- H0 : 3 = 4 o H0 : 3 + 4 = 0
From above we derive:
t= p
(b3 + b4 )
var (b3 + b4 )
t(n k)
Then Rb = b3 + b4 and r = 0.
H0 : 2 = 3 = = k = 0
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
0
Rb = Rb2 =
.
.
.
0
..
.
0
0
.
.
.
b2
b3
.
.
.
0
bk
1
= b~2
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
X X =
X2
iT
X2T
, then:
X2
n
X2T i
i T X2
X2T X2
(X X )
=
B22
h
i1
h
Where B22 = X2T X2 X2T in1 i T X2
= X2T X2 I
i1
h
= (X T X )1
B22 = X2T AX2
1 T
n ii
i1
and then
Where A is the idempotent matrix such that AAT = A, from which we obtain:
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
R(X X )
= (X
X )
Which is a ((k 1) (k 1)) matrix equal to B22 . Then the test F is:
h
i1
(Rb r )/q
(Rb r )T R(X T X )1 R T
F
e T e/(n k)
F (q, n k)
~
b2 /(k 1)
b2T (X T X )~
F (k 1, n k)
e T e/(n k)
ESS/(k 1)
F (k 1, n k)
RSS/(n k)
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
RSS
TSS
F =
X1
X2
b1
b2
+ e = X 1 b1 + X 2 b2 + e
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
(M1 Y ) (M1 Y ) = Y M1 Y = b2 X2 M1 X2 b2 + e e
Where:
I Y T M1 Y are the RSS of the regression of Y on X1 ;
I e T e are the RSS of the regression of Y on X1 and X2 ;
I b2T X2T M1 X2 b2 is the reduction of the RSS when the variable X2 is included into the
regression of Y on X1 ;
X1 X2
We may denote with e T e the RSS of the regression of Y on X =
and with e T e
the RSS dof the regression of Y only on X1 .
Outline
Test on single parameters
Test on more parameters
Test: matrix algebra approach
T T
b2 X 2 M 1 X 2 b2
=
=
Y M1 Y = b2 X2 M1 X2 b2 + e e
e
e e e
(e T e e T e)/k2
F (k2 , n k)
e T e/(n k)