sandbox.stats.runs.runstest_1samp()
statsmodels.sandbox.stats.runs.runstest_1samp
-
statsmodels.sandbox.stats.runs.runstest_1samp(x, cutoff='mean', correction=True)
[source] -
use runs test on binary discretized data above/below cutoff
Parameters: x : array_like
data, numeric
cutoff : {‘mean’, ‘median’} or number
This specifies the cutoff to split the data into large and small values.
correction: bool
Following the SAS manual, for samplesize below 50, the test statistic is corrected by 0.5. This can be turned off with correction=False, and was included to match R, tseries, which does not use any correction.
Returns: z_stat : float
test statistic, asymptotically normally distributed
p-value : float
p-value, reject the null hypothesis if it is below an type 1 error level, alpha .
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.sandbox.stats.runs.runstest_1samp.html