statsmodels.sandbox.stats.runs.Runs

class statsmodels.sandbox.stats.runs.Runs(x)[source]

class for runs in a binary sequence

Parameters:
xarray_like, 1d

data array,

Notes

This was written as a more general class for runs. This has some redundant calculations when only the runs_test is used.

TODO: make it lazy

The runs test could be generalized to more than 1d if there is a use case for it.

This should be extended once I figure out what the distribution of runs of any length k is.

The exact distribution for the runs test is also available but not yet verified.

Methods

runs_test([correction])

basic version of runs test


Last update: Dec 14, 2023