You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior was initially noticed when comparing "wild-bootstrap" to the "ri" sample_method p-values when the parameter of interest has no association with the outcome.
With the tight null t-distribution, the resulting p-value is too small.
To reproduce:
importpyfixestaspfimportnumpyasnpimportmatplotlib.pyplotasplt# Get data and randomizedata=pf.get_data()
np.random.default_rng(232)
data["X1"] =np.random.choice(data["X1"], size=data.shape[0], replace=False)
fit=pf.feols("Y ~ X1", data=data)
fit.summary()
At second thought, this might not necessarily be a bug, for two reasons:
slightly different nulls: first, the randomization inference estimator tests a "sharp" null hypothesis of no effect for any individual, i.e. we test that $H0:Yi(1)=Yi(0)$ for all i, which is slightly different from testing that the average treatment effect is zero (which is what we do when we run inference via the bootstrap).
different properties of the tests: it might be that the bootstrap is more conservative (or the ritest being less conservative), leading to different distributions
Will have to think about this more - took a look at the code & it looked mostly fine, though will have to check again. Width of the sampling interval differences looks indeed suspicious.
Possible issue I noticed while working on #698.
The behavior was initially noticed when comparing "wild-bootstrap" to the "ri" sample_method p-values when the parameter of interest has no association with the outcome.
With the tight null t-distribution, the resulting p-value is too small.
To reproduce:
Estimation: OLS
Dep. var.: Y, Fixed effects: 0
Inference: iid
Observations: 998
| Coefficient | Estimate | Std. Error | t value | Pr(>|t|) | 2.5% | 97.5% |
|:--------------|-----------:|-------------:|----------:|-----------:|-------:|--------:|
| Intercept | -0.160 | 0.119 | -1.344 | 0.179 | -0.394 | 0.074 |
| X1 | 0.033 | 0.090 | 0.367 | 0.714 | -0.144 | 0.211 |
RMSE: 2.304 R2: 0.0
The text was updated successfully, but these errors were encountered: