Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted quantiles #2707

Merged
merged 10 commits into from Feb 13, 2016
Merged

Weighted quantiles #2707

merged 10 commits into from Feb 13, 2016

Conversation

kshedden
Copy link
Contributor

I added weighted quantiles to theDescrStatsW class. The calculation is straightforward, right out of the SAS docs:

https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect028.htm

I couldn't find a good way to integrate tests into the existing test code, so I started an independent testing mixin class. This provides some additional test coverage for other statistics (mean, var, sum, sem, etc).

2d, returns a pandas DataFrame indexed by the probability
points, with each column containing the quantiles for the
corresponding column of the data.

Copy link
Member

Choose a reason for hiding this comment

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

I think we need to mention that it uses simple averaging between points, i.e. midpoint.

@josef-pkt
Copy link
Member

This seems to have been forgotten.

@kshedden can you rebase?
We can wait for travis to see if there are new incompatibility problems and then merge.

@josef-pkt
Copy link
Member

I didn't realize it is already rebased, and just a few merges behind master. (I only looked at the commit date)

so merging

josef-pkt added a commit that referenced this pull request Feb 13, 2016
@josef-pkt josef-pkt merged commit 03a9457 into statsmodels:master Feb 13, 2016
@kshedden kshedden deleted the weighted_quantiles branch July 1, 2016 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants