{"action":"closed","issue":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4014","repository_url":"https://api.github.com/repos/statsmodels/statsmodels","labels_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4014/labels{/name}","comments_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4014/comments","events_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4014/events","html_url":"https://github.com/statsmodels/statsmodels/issues/4014","id":264403997,"number":4014,"title":"get_robustcov mismatch?","user":{"login":"jbrockmendel","id":8078968,"avatar_url":"https://avatars1.githubusercontent.com/u/8078968?v=4","gravatar_id":"","url":"https://api.github.com/users/jbrockmendel","html_url":"https://github.com/jbrockmendel","followers_url":"https://api.github.com/users/jbrockmendel/followers","following_url":"https://api.github.com/users/jbrockmendel/following{/other_user}","gists_url":"https://api.github.com/users/jbrockmendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrockmendel/subscriptions","organizations_url":"https://api.github.com/users/jbrockmendel/orgs","repos_url":"https://api.github.com/users/jbrockmendel/repos","events_url":"https://api.github.com/users/jbrockmendel/events{/privacy}","received_events_url":"https://api.github.com/users/jbrockmendel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-10T23:01:47Z","updated_at":"2017-12-25T18:16:06Z","closed_at":"2017-12-25T18:16:06Z","author_association":"CONTRIBUTOR","body":"As discussed elsewhere, base.covtype.get_robustcov_results is _almost_ identical to regression.linear_model.RegressionResults.get_robustcov_results.  Quick question about the \"almost\" part.\r\n\r\nFrom the linear_model [version](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/regression/linear_model.py#L2175):\r\n\r\n```\r\n    # TODO cannot access cov without calling se first\r\n    getattr(self, cov_type.upper() + '_se')\r\n    res.cov_params_default = getattr(self, 'cov_' + cov_type.upper())\r\n```\r\n\r\nFrom the covtype [version](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/base/covtype.py#L177):\r\n\r\n```\r\n    res.cov_params_default = getattr(self, 'cov_' + cov_type.upper(), None)\r\n    if res.cov_params_default is None:\r\n        # results classes that don't have cov_HCx attribute\r\n        res.cov_params_default = sw.cov_white_simple(self, use_correction=False)\r\n```\r\n\r\nWhy is the `getattr(self, cov_type.upper() + '_se')` call necessary in linear_mode but not in covtype?"}}
{"actor":{"display_login":"jbrockmendel"}}