File Exchange

image thumbnail

The Runs Test

version 1.0 (1.13 KB) by

Check if the positive and negative runs in the vector x is random or not.

3 Downloads

Updated

No License

%PURPOSE: check if the positive and negative runs in the vector x is random or not.
%-----------------------------
%USAGE: z=runtest(x)
%where: z is the z stat for a run
% x=a vector variable (nobs x 1)
%-----------------------------
%
%The function could be used on any data with a binomial distribution.
%But the user need to assign positivity and negativity to the two states in
%the data.
%
%Reference: Siegal (1956), Nonparametric Statistics.

Comments and Ratings (1)

Bradley Vines

Wei Li's 'runtest' function produced the same output as a SPSS runs test when applied to a 50 item list.
This function conveniently fills a void in my current matlab statistics toolkit. Thank you Wei Li.

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video