SPB Git

spb/wp29_uqo

Public
3.5 KB · 51 lines markdown
1# F2-conf-02 — Is the memo's slope really significant?23## Question4Estimate β in y_t = α + β x_t + u_t by full-sample OLS and assess H0: β = 0 with a standard error valid under serially correlated disturbances (HAC, Newey–West/Bartlett). Check the memo's claim that the slope is significant at the 5% level.56## Data and exclusions7`data/series.csv`: 400 rows read, 1990-01 to 2023-04. Checks: no missing values, no duplicate months, no gaps (consecutive months). No exclusions; n = 400. No data issues detected. The data are simulated (synthetic), not observed.89## Method10- OLS of y on a constant and x (statsmodels).11- Conventional (iid) SE reproduced for comparison with the memo.12- First-order autocorrelation of the OLS residuals.13- HAC SE: Newey–West with a Bartlett kernel and small-sample correction (statsmodels `cov_type="HAC"`, `use_correction=True`).14- Bandwidth: Andrews (1991) AR(1) plug-in for the Bartlett kernel, applied to the slope score v_t = (x_t − x̄)û_t. Fitted AR(1) of the score = 0.401, which gives a raw bandwidth of 8.18, rounded **up to 9 lags**. I chose this data-dependent rule over the fixed Newey–West (1994) rule of thumb floor(4(T/100)^{2/9}) = 5 because the task says both the errors and the regressor are persistent. Results for other lag choices are reported below.15- Inference uses the normal reference distribution: two-sided p-value and 95% CI = β̂ ± 1.96·SE_HAC.1617## Results18| quantity | value |19|---|---|20| α̂ (intercept) | 2.0925 |21| β̂ (slope) | 0.1017 |22| SE iid (memo's measure) | 0.0448 (t = 2.27, p = 0.0238): reproduces the memo exactly |23| residual AR(1) ρ̂ | 0.611 |24| SE HAC (9 lags) | 0.0654 |25| t_HAC | 1.56 |26| p_HAC (two-sided) | 0.120 |27| 95% CI (HAC) | [−0.026, 0.230] |2829The HAC SE is about 46% larger than the iid SE. With it, the slope is **not** significant at the 5% level, and the 95% CI contains 0. **The memo's significance claim is not supported** (`memo_claim_supported = false`). The memo's arithmetic is correct. Its error is the uncertainty measure: conventional SEs assume independent errors, but here the residuals are strongly autocorrelated (ρ̂ ≈ 0.61) and x is persistent, so the iid SE is too small.3031## Uncertainty32How much the HAC result depends on the bandwidth (Bartlett kernel, same estimate β̂ = 0.1017):3334| lags | SE | t | p |35|---|---|---|---|36| 0 (White, heteroskedasticity only) | 0.0490 | 2.08 | 0.038 |37| 5 (NW 1994 rule of thumb) | 0.0645 | 1.58 | 0.115 |38| 8 | 0.0653 | 1.56 | 0.119 |39| 9 (chosen) | 0.0654 | 1.56 | 0.120 |40| 12 | 0.0657 | 1.55 | 0.121 |41| 18 | 0.0663 | 1.54 | 0.125 |42| 24 | 0.0660 | 1.54 | 0.123 |4344Every bandwidth that allows for autocorrelation (≥ 5 lags) gives p ≈ 0.115–0.125. Only the White SE, which corrects for heteroskedasticity but ignores autocorrelation, gives p < 0.05. So the verdict does not depend on the bandwidth choice.4546## Limitations and open issues47- HAC tests with normal critical values tend to over-reject in finite samples when the data are persistent. Fixed-b or Student-t critical values would give somewhat larger p-values, which would only strengthen the "not significant" conclusion. They were not computed.48- β is a linear-projection coefficient: it measures association, not a causal effect.49- Feasible GLS (Cochrane–Orcutt) could give a more precise estimate under the AR(1) error structure. It was not used because the task specifies OLS with HAC inference.50- No random numbers were used (`random_seed = null`). The analysis is deterministic.51
Files · main
Menu

Theme