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
BUG/Review: fit_constrained, scale and cov_type #4193
most likely a serious bug-wrong #3856 (comment)
GLM gaussian with fit_constrained has wrong cov_params, applies scale twice.
unit tests for fit_constrained are only for Poisson and Logit/Binomial for discrete models and GLM, AFAICS
Also, there are no unit tests of fit_constrained with cov_type. fit_constrained PR predates adding cov_type to fit, but came a bit after the initial discrete sandwich code.
possible solution for scale bug is to either
assign to cov_params_default instead of normalized_cov_params, but that is also used for cov_type, or
take out the scale before assigning to normalized_cov_params. or
return normalized_cov_params instead of cov_params in base._constraints.fit_constrained
another smaller issue: the results returned by fit_constrained don't show the correct optimization setting, e.g. method is IRLS even though the constrained auxiliary model uses the correct newton or bfgs
In [31]:
res_glm_c.results_constrained.method
Out[31]:
'newton'
mle_settings is still not consistently attached to the GLM results (in fit), mle_results is available
Activity
josef-pkt commentedon Jan 7, 2018
another smaller issue: the results returned by fit_constrained don't show the correct optimization setting, e.g. method is IRLS even though the constrained auxiliary model uses the correct newton or bfgs
mle_settingsis still not consistently attached to the GLM results (infit), mle_results is availableTST: add unit tests GLM-Gaussian fit_constrained issue statsmodels#4193
TST: add unit tests GLM-Gaussian fit_constrained issue statsmodels#4193
REF/BUG/ENH: fit_constrained set cov_params_default, closes statsmode…
REF/BUG/ENH: fit_constrained set cov_params_default, closes statsmode…