stats.diagnostic.normal_ad()

statsmodels.stats.diagnostic.normal_ad statsmodels.stats.diagnostic.normal_ad(x, axis=0) Anderson-Darling test for normal distribution unknown mean and variance Parameters: x : array_like data array, currently only 1d Returns: ad2 : float Anderson Darling test statistic pval : float pvalue for hypothesis that the data comes from a normal distribution with unknown mean and variance

stats.diagnostic.linear_rainbow()

statsmodels.stats.diagnostic.linear_rainbow statsmodels.stats.diagnostic.linear_rainbow(res, frac=0.5) Rainbow test for linearity The Null hypothesis is that the regression is correctly modelled as linear. The alternative for which the power might be large are convex, check Parameters: res : Result instance Returns: fstat : float test statistic based of F test pvalue : float pvalue of the test

stats.diagnostic.linear_lm()

statsmodels.stats.diagnostic.linear_lm statsmodels.stats.diagnostic.linear_lm(resid, exog, func=None) Lagrange multiplier test for linearity against functional alternative limitations: Assumes currently that the first column is integer. Currently it doesn?t check whether the transformed variables contain NaNs, for example log of negative number. Parameters: resid : ndarray residuals of a regression exog : ndarray exogenous variables for which linearity is tested func : callable If func

stats.diagnostic.linear_harvey_collier()

statsmodels.stats.diagnostic.linear_harvey_collier statsmodels.stats.diagnostic.linear_harvey_collier(res) Harvey Collier test for linearity The Null hypothesis is that the regression is correctly modeled as linear. Parameters: res : Result instance Returns: tvalue : float test statistic, based on ttest_1sample pvalue : float pvalue of the test Notes TODO: add sort_by option This test is a t-test that the mean of the recursive ols residuals is zero. Calculating the recursive residual

stats.diagnostic.lillifors()

statsmodels.stats.diagnostic.lillifors statsmodels.stats.diagnostic.lillifors(x, pvalmethod='approx') Lillifors test for normality, Kolmogorov Smirnov test with estimated mean and variance Parameters: x : array_like, 1d data series, sample pvalmethod : ?approx?, ?table? ?approx? uses the approximation formula of Dalal and Wilkinson, valid for pvalues < 0.1. If the pvalue is larger than 0.1, then the result of table is returned ?table? uses the table from Dalal and Wilkinson, which is

stats.diagnostic.kstest_normal()

statsmodels.stats.diagnostic.kstest_normal statsmodels.stats.diagnostic.kstest_normal(x, pvalmethod='approx') Lillifors test for normality, Kolmogorov Smirnov test with estimated mean and variance Parameters: x : array_like, 1d data series, sample pvalmethod : ?approx?, ?table? ?approx? uses the approximation formula of Dalal and Wilkinson, valid for pvalues < 0.1. If the pvalue is larger than 0.1, then the result of table is returned ?table? uses the table from Dalal and Wilkinson, w

stats.diagnostic.het_white()

statsmodels.stats.diagnostic.het_white statsmodels.stats.diagnostic.het_white(resid, exog, retres=False) White?s Lagrange Multiplier Test for Heteroscedasticity Parameters: resid : array_like residuals, square of it is used as endogenous variable exog : array_like possible explanatory variables for variance, squares and interaction terms are included in the auxilliary regression. resstore : instance (optional) a class instance that holds intermediate results. Only returned if store=Tru

stats.diagnostic.het_goldfeldquandt

statsmodels.stats.diagnostic.het_goldfeldquandt statsmodels.stats.diagnostic.het_goldfeldquandt = see class docstring

stats.diagnostic.het_breushpagan()

statsmodels.stats.diagnostic.het_breushpagan statsmodels.stats.diagnostic.het_breushpagan(resid, exog_het) Breush-Pagan Lagrange Multiplier test for heteroscedasticity The tests the hypothesis that the residual variance does not depend on the variables in x in the form Math: sigma_i = sigma * f(alpha_0 + alpha z_i) Homoscedasticity implies that $alpha=0$ Parameters: resid : arraylike, (nobs,) For the Breush-Pagan test, this should be the residual of a regression. If an array is given in ex

stats.diagnostic.het_arch()

statsmodels.stats.diagnostic.het_arch statsmodels.stats.diagnostic.het_arch(resid, maxlag=None, autolag=None, store=False, regresults=False, ddof=0) Engle?s Test for Autoregressive Conditional Heteroscedasticity (ARCH) Parameters: resid : ndarray, (nobs,) residuals from an estimation, or time series maxlag : int highest lag to use autolag : None or string If None, then a fixed number of lags given by maxlag is used. store : bool If true then the intermediate results are also returned