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

Q-Q plot with probabilities #412

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
485d803
stash for basic probability axis on qqplots
phobson Jul 31, 2012
daa4496
ENH: added option to make QQplot with theoretical probabilities inste…
phobson Jul 31, 2012
55fa843
cleaned up some whitespace and added a docstring
phobson Jul 31, 2012
a328fbb
added test coverage for new qq/probplot functionality
phobson Jul 31, 2012
c16c153
fixed some private fxn naming conventions per pep8
phobson Jul 31, 2012
2024c4e
basic ground work for the prob_plot object
phobson Aug 15, 2012
1db62dd
fixed logic in determining the sample probabilities so that things lo…
phobson Aug 16, 2012
b2998c1
comparmentalized the boilerplate plotting codes and added docstrings
phobson Aug 16, 2012
2697a11
refined documentation, renamed the class to ProbPlot for PEP8 complia…
phobson Aug 16, 2012
30421c3
docstring formatting (triple double quotes and indentation)
phobson Aug 16, 2012
c1a2f20
Added qqline to imports in api.py and added example of two-sample Q-Q…
phobson Aug 16, 2012
b60d415
expanded tests to reflect modifcations to the api and expanded coverage
phobson Aug 16, 2012
3645705
remove extraneous arg in qqplot function
phobson Aug 16, 2012
1e4d31f
reorded 'ax' and 'line' kwargs in 'ProbPlot' plotting methods and rem…
phobson Aug 16, 2012
4a52ff5
added option to plot probplot as 'exceedance' or 'non-exceedance' pro…
phobson Aug 17, 2012
5339e27
added function and method to construct a Q-Q plot from two sample pop…
phobson Aug 17, 2012
07a7051
cleaned up/refined some docstrings
phobson Aug 17, 2012
295041f
expanded test coverage and added kwarg to method
phobson Aug 19, 2012
6047ab7
expanded test coverage and added -other- kwarg to Probplot.ppplot to …
phobson Aug 19, 2012
a4e2baf
expanded docs example to demonstrate new functionality
phobson Aug 19, 2012
9b19899
Merge branch 'qqplot-with-probs' of github.com:phobson/statsmodels in…
phobson Aug 19, 2012
d8fb0d1
moved docstring from __init__ to class defn
phobson Aug 19, 2012
92269c4
minor cleanup of old debug code, docstring formats, etc
phobson Aug 19, 2012
694e201
more cleanup, misc github comments
phobson Aug 20, 2012
7001225
switched quantile/percentile calcs to a lazy style and dist now accep…
phobson Aug 31, 2012
a1f7e22
removed old code that was commented out
phobson Aug 31, 2012
6e9de79
smarter exception handling for ppf (distributions can fail to compute…
phobson Sep 4, 2012
1077d3b
DOC: added a See Also section to top-level docstrings
phobson Sep 5, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 20 additions & 1 deletion docs/source/plots/graphics_gofplots_qqplot.py
Expand Up @@ -3,7 +3,7 @@
Created on Sun May 06 05:32:15 2012

Author: Josef Perktold

editted by: Paul Hobson (2012-08-19)
"""
from scipy import stats
from matplotlib import pyplot as plt
Expand Down Expand Up @@ -49,3 +49,22 @@
fig.tight_layout()

plt.gcf()


# example with the new ProbPlot class
import numpy as np
x = np.random.normal(loc=8.25, scale=3.5, size=37)
y = np.random.normal(loc=8.00, scale=3.25, size=37)
pp_x = sm.ProbPlot(x, fit=True)
pp_y = sm.ProbPlot(y, fit=True)

# probability of exceedance
fig2 = pp_x.probplot(exceed=True)

# compare x quantiles to y quantiles
fig3 = pp_x.qqplot(other=pp_y, line='45')

# same as above with probabilities/percentiles
fig4 = pp_x.ppplot(other=pp_y, line='45')


6 changes: 1 addition & 5 deletions statsmodels/api.py
Expand Up @@ -13,7 +13,7 @@
from __init__ import test
from . import version
from info import __doc__
from graphics.gofplots import qqplot
from graphics.gofplots import qqplot, qqplot_2samples, qqline, ProbPlot
from .graphics import api as graphics
from .stats import api as stats

Expand All @@ -25,9 +25,5 @@ def open_help(chmpath=chmpath):
from subprocess import Popen
p = Popen(chmpath, shell=True)


del os
del chmpath