Skip to content

Covtype hacpanel groups - #3162

Merged
josef-pkt merged 3 commits into
statsmodels:masterfrom
josef-pkt:covtype_hacpanel_groups
Aug 16, 2016
Merged

josef-pkt merged 3 commits into
statsmodels:masterfrom
josef-pkt:covtype_hacpanel_groups

Conversation

@josef-pkt

@josef-pkt josef-pkt commented Aug 16, 2016 •

Copy link
Copy Markdown
Member

closes #3155

cov_type='hac_panel' allow groups instead of time to specify panel units

adds also case insensitivity to cov_type keyword

I didn't check if `hac-groupsum' can be similarly changed. Without checking the details again, I think it's not possible because we need the time index to aggregate for contemporaneous correlation.

@josef-pkt

Copy link
Copy Markdown
Member Author

this should be pretty safe because it just adds an option and doesn't change current behavior.

@josef-pkt

Copy link
Copy Markdown
Member Author

technical detail (the ducks):

time needs to be ordered, comparison is diff(time) < 0, this could be weakened to work without the diff, i.e. to a reduction in time time[1:]< time[:-1]

groups only need to define "not equal" != (groups[:-1] != groups[1:])

@coveralls

coveralls commented Aug 16, 2016 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.003%) to 89.196% when pulling 1ecc95e on josef-pkt:covtype_hacpanel_groups into 5fa4f8e on statsmodels:master.

use_correction='hac',
df_correction=False)
cls.res1 = mod1.fit(cov_type='hac-panel', cov_kwds=kwds)
cls.res1b = mod1.fit(cov_type='nw-panel', cov_kwds=kwds)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an unused estimation

@josef-pkt

Copy link
Copy Markdown
Member Author

I cleaned up the unit test, and changed the groups identification using time as in last comment.
time now only needs to have <.
But I don't know if we are using anything except integer time in the unit tests, most likely not.

should be ready when green

@coveralls

coveralls commented Aug 16, 2016 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.003%) to 89.196% when pulling 7066842 on josef-pkt:covtype_hacpanel_groups into 5fa4f8e on statsmodels:master.

@josef-pkt josef-pkt added this to the 0.8 milestone Aug 16, 2016
@josef-pkt

Copy link
Copy Markdown
Member Author

all green, merging

@josef-pkt
josef-pkt merged commit e0d5807 into statsmodels:master Aug 16, 2016
@josef-pkt josef-pkt mentioned this pull request Aug 16, 2016
4 of 28 tasks
@josef-pkt
josef-pkt deleted the covtype_hacpanel_groups branch August 17, 2016 15:16
josef-pkt added a commit to josef-pkt/statsmodels that referenced this pull request Aug 19, 2016
…roups

ENH: cov_type hac_panel allow groups
@TomAugspurger TomAugspurger mentioned this pull request Feb 2, 2017
2 tasks done
a timeseries of an individual or group can be either specified by
group indicators or by increasing time periods.

- `time` array_like (required) : index of time periods

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls avoid names that can be confused for built-ins or stdlib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

groups specification under cov_type='hac-panel' on unbalanced panel data

3 participants