rana

RANA (Runs ANAlysis program

Index

What is Runs Analysis

Features

The User Interface

Downloading

RANA (RUNS Analysis) is a 32 bit program to make analysis of runs. RANA has a visual interface to easily input the data and edit parameters. RANA runs on Windows 95 and Windows NT 3.51 or later. It does not run on16 bit platforms.

What is runs analysis?

Runs analysis is a statistical technique used to determine the degree of aggregation of items ordered in a sequence. For example, suppose you have ten plants in a row. Each plant can be infected or healthy, so we are dealing with a boolean variable. Lets denote the infected plants with 1's and the healthy plants with 0's. One extreme possible arrangement is:

1,1,1,1,1,0,0,0,0,0

A run is a set of contiguous plants that share the same trait, in this case, the infected ones. Note that the definition consider the case where there is a single infected plant following by a healthy one. In the previous example there are two runs, one composed of five 1's and the other composed of five 0's. Another extreme arrangement is:

1,0,1,0,1,0,1,0,1,0

Here we have ten runs, each one composed of one element (zero or one). Under the null hypothesis of randomness, each run has a certain probability of occurrence P(U=u) that can be computed from the theory of runs. In plant epidemiology and entomology, researchers are interested in determining the type of spatial disposition of infected (infested) plants: random, contagious (aggregation), or regular (=uniform). In a contagious disposition, the infected plants are more probably to be contiguous, therefore we will find few runs. On the other hand, a regular disposition imply that the infected plants are systematically more arranged, that is, we will find much more runs. The alternative dispositions can be tested statistically.

The common way to test randomness of runs is by using the normal approximation (Gibbons, J.D. 1985. Nonparametric statistical inference. McGraw-Hill, New York.) Under this approach, we have to estimate the mean and the standard deviation of runs, then make the test by using the z statistic. If the z value is higher than the z value from tables, then we reject the null hypothesis of randomness with a preselected type I error (alpha). However, this approach works well if the sample size is large and the number of infected plants is nearly half the size of the sample size, otherwise there is bias in the approach (Lopez-Collado, unpublished data).

Another approach is to use directly the runs distribution to determine what is the exact probability that (|U| >= u), given the null hypothesis of randomness. If the alternative hypothesis is a uniform disposition, then we expect a large number of runs and the test is right-sided, that is, given a number of runs u, we compute alpha as: P(U >=(u-1)). If the alternative hypothesis is a contagious disposition, then we expect to have few runs and the test is left-sided: P(U <=u).

RANA computes the probabilities based on the runs distribution, instead of relying on the normal approximation, thus, the p-value is the exact value and not an approximation.This is an advantage when having small sample size.

Features

RANA is a computer program written with Delphi (thanks Borland!) that allows to perform runs analysis from an easy-to-use visual interface. RANA has the following characteristics:

Visual Features

• Multiple Grid Windows to input data.

• Result Windows to display results.

• Edit Hypothesis Dialog Box.

• Edit Grid Dialog Box.

• Runs Distribution Dialog Box

• .

• Progress Bar.

• About Dialog Box (Shows memory and resources available).

• Copy to, and Paste from the Clipboard.

• Save results and data to files.

• Fill in grid values with the mouse!

Statistical features

Analysis of runs:

• Maximum size of row (column) is 500

• .

• The user can select the alternative hypothesis: Uniform, contagious or both.

• The user can set the value for the type-I error (0 < alpha < 1)

• .

• Analysis can be done by rows, columns or both.

Distribution of Runs

• The program can compute the distribution of runs for 10 < total < 500 and any value of n1 (see technical guide for details).

The User Interface

RANA is composed of a main Window and two types of child windows: the result window, and the data (grid) window.

Result Window. The result window is a nonclosable windows, so it can only be resized or minimized. The result window is used to display information from the analysis of runs or from the computation of run distributions. The user can also input information to this window as required. From the button bar, the user can open and save the information as text files. The text in the window can also be cutted, copied to, and pasted from the clipboard. Printing is also available. The color of the background can be changed from the button bar.

The grid windows. The user can create grid windows as required. From the menu bar, the File option and the New submenu option, the user can create a new grid. Each grid correspond to a data set for run analysis. The size, color and font type of the grid is controlled by the Edit Grid Dialog Box. The size of the grid range from 10 to 500 (rows or columns). From the grid windows the user input boolean values to each cell by double clicking on the cell. The boolean value is represented by a character. This character, or mark can be changed from the Edit Grid Dialog Box. If necessary, the user can fill in blocks of cells by pressing the mouse in the cell with the desired character and holding down the mouse while moving to select the desired block. After releasing the button, the block will be covered by the character in the first selected cell.

Dialog Windows.

About Dialog. Shows the version, copyright notice, and the current resources.

Edit Grid Dialog. You can change the number of columns, rows, and the symbol (mark) for the boolean variable. You also have the option to change the color and font type.

Edit Hypothesis Dialog. Allows the user to change the alternative hypothesis and set the type-I error rate.

Analysis of Runs

From the menu bar or the button bar, the user can perform the analysis of runs for the grid. There are three options for the analysis: Analysis by row, by column, and whole analysis (rows and columns). By default, the alternative hypothesis is contagious and is tested with a type-I error (alpha) of 0.05. However, you can change the alternative hypothesis and the value of alpha by calling the Edit Hypothesis Dialog Box.

Once you run the analysis, the results are transferred to the Result Window. In this window, the following structure is presented:

• The name of the grid (file).

• Column One. The number of row (or column)

• Column two.The number of elements with the attribute (mark), n1.

• Column three. The number of runs.

• Column four. The Run mean value E(U).

• Column five. The standard deviation of the runs S.D.(U).

• Column six. The P-value for the alternative hypothesis.

• Column seven. The alternative hypothesis Ha, when the test is significant.

At the end of the rows, a percentage value is presented for each alternative hypothesis.

Downloading

RANA is free but is copyrighted. Before downloading, read the license agreement HERE.

You can download the zip file that contains:

executable, technical wide (WordPerfect Document), readme.txt, and example data file.

Feedback

Once you have tried the program, please send me a note about it. Bugs, visual interface, statistical performance, etc. Send your comments, suggestions or criticisms to: Jose Lopez-Collado. .

Copyright © 1996-2006 by Jose Lopez-Collado. All Rights Reserved.