scikits.statsmodels.sandbox.graphics.qqplot

scikits.statsmodels.sandbox.graphics.qqplot(data, dist=<scipy.stats.distributions.norm_gen object at 0x01A7CF70>, binom_n=None)

qqplot of the quantiles of x versus the ppf of a distribution.

Parameters:

data : array-like

1d data array

dist : scipy.stats.distribution or string

Compare x against dist. Strings aren’t implemented yet. The default is scipy.stats.distributions.norm

Returns:

matplotlib figure. :

Notes

Only the default arguments currently work. Depends on matplotlib.

Examples

>>> import scikits.statsmodels as sm
>>> from matplotlib import pyplot as plt
>>> data = sm.datasets.longley.Load()
>>> data.exog = sm.add_constant(data.exog)
>>> mod_fit = sm.OLS(data.endog, data.exog).fit()
>>> res = mod_fit.resid
>>> std_res = (res - res.mean())/res.std()

Import qqplots from the sandbox

>>> from scikits.statsmodels.sandbox.graphics import qqplot
>>> qqplot(std_res)
>>> plt.show()

Previous topic

scikits.statsmodels.sandbox.tools.tools_pca.pcasvd

Next topic

scikits.statsmodels.sandbox.descstats.sign_test

This Page