statsmodels.stats.diagnostic.anderson_statistic

statsmodels.stats.diagnostic.anderson_statistic(x, dist='norm', fit=True, params=(), axis=0)[source]

Calculate the Anderson-Darling a2 statistic.

Parameters:
xarray_like

The data to test.

dist{‘norm’, callable}

The assumed distribution under the null of test statistic.

fitbool

If True, then the distribution parameters are estimated. Currently only for 1d data x, except in case dist=’norm’.

paramstuple

The optional distribution parameters if fit is False.

axisint

If dist is ‘norm’ or fit is False, then data can be an n-dimensional and axis specifies the axis of a variable.

Returns:
{float, ndarray}

The Anderson-Darling statistic.


Last update: Dec 16, 2024