Skip to content

Commit 932093c

Browse files
committed
Add standard errors tests
1 parent 353f3cd commit 932093c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/ols_hac.jl

+4-5
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,16 @@ Vt = [0.00417663470962045 -0.00014277423204925 0.000404820124045818
137137
-0.00014277423204925 0.00310914818879932 -0.000418125055191947
138138
0.000404820124045818 -0.000418125055191946 0.00345356514902845]
139139
@test VVt atol=1e-4
140+
@test stderr(lm1,ParzenKernel(Andrews), prewhite = true) sqrt.(diag(Vt)) atol = 0.001
140141

141142
V = vcov(lm1, QuadraticSpectralKernel(Andrews), prewhite = true)
142143
Vt = [0.00422525037811967 -0.000131637826271777 0.000413149700377485
143144
-0.000131637826271777 0.00308879179300843 -0.00042052413768716
144145
0.000413149700377485 -0.000420524137687161 0.00342999158493283]
146+
145147
@test VVt atol=1e-4
148+
@test stderr(lm1, QuadraticSpectralKernel(Andrews), prewhite = true) sqrt.(diag(Vt)) atol = 0.001
149+
146150

147151
@test optimalbw(Andrews, BartlettKernel, lm1) 1.79655260917
148152
@test optimalbw(Andrews, TruncatedKernel, lm1) 0.923095757094
@@ -181,8 +185,3 @@ Vt = [0.00422525037811967 -0.000131637826271777 0.000413149700377485
181185
# V = vcov(lm1, VARHAC(1,3,3))
182186

183187

184-
## X = CovarianceMatrices.ModelMatrix(lm1.model);
185-
## u = CovarianceMatrices.wrkresidwts(lm1.model.rr);
186-
## z = X.*u;
187-
188-
## vcov(lm1, TruncatedKernel(1.0), prewhite = false)

0 commit comments

Comments
 (0)