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
{{ message }}
Repository navigation
REF: method to get (non-default) robust cov from results. #2072
instead of just get_robustcov_results we should have (also) get_robustcov that returns the covariance matrix and not a results instance.
Usage: To write robust score tests we don't need the parameter estimates for the full model but we need the score and hessian and either score_obs or robustcov for the full model.
related: #2054
roughly
fit_restricted estimates the restricted parameters but has the full model
if we have robust cov_params of the unrestricted model evaluated at the restricted parameters, then we can plug it into the score/LM_test formula for M-estimators. (new method to come)
We get HC, HAC or cluster robust score/LM tests with exactly the same definition as in cov_type.
possible problem, looking at base.covtype.get_robustcov_results:
We are also adjusting other things in the results instance for small sample correction like degrees of freedom.
Small sample correction might not apply correctly if we have the full model, but estimation is based on a smaller model (n_params estimated is not the same as n_params in full model)
This won't be relevant asymptotically or with chisquare based score tests, df_resid is used in scaling factor in all models (in contrast to Stata which uses it only for the linear regression).
It might be possible to use use_t=True for small sample correction, however in several models or cases Monte Carlo articles showed that score test is often conservative and using t or F would make it even more conservative. Wald test are often liberal and overreject, where t or F goes in the right direction.
We might need different small sample corrections for score/LM tests than for Wald tests.
possible solution for implementation problem: base.covtype.get_robustcov_results could return a dict with keys of results instance that should be adjusted or added, instead of adjusting or adding it directly. Needs one extra step to fix the results instance but would make the function work without requiring a results instance.
Activity
josef-pkt commentedon Jun 1, 2018
bump for 0.10,
I'm working on robust score tests again in PR #2096