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

class for runs in a binary sequence

xarray_like, 1d

data array,


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.



basic version of runs test

Last update: Dec 14, 2023