No BSD License  

4.0

4.0 | 1 rating Rate this file 9 Downloads (last 30 days) File Size: 1.13 KB File ID: #4421

The Runs Test

by

 

29 Jan 2004 (Updated )

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

| Watch this File

File Information
Description

%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.

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
05 Mar 2004 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.

Contact us