Skip to main content

StatsCochranTest

StatsCochranTest [/Q/Z/ALPH=significance /T=k /WSTR=wList ] [wave1,wave2, ... wave100 ]

The StatsCochranTest operation performs Cochran's (Q) test on a randomized block or repeated measures dichotomous data. Output is to the M_CochranTestResults wave in the current data folder or optionally to a table.

Flags

/ALPH=valSets the significance level (default val =0.05).
/DEST=destWaveSpecify the output wave for the test. If you do not specify this flag, the operation stores the data in the wave M_CochranTestResults in the current data folder.
This flag was added in Igor Pro 10.00.
/FREECreates the destination wave as a free wave.
/FREE is allowed only in functions, and only if the destination waves are simple names or wave reference structure fields.
See Free Waves for more discussion.
The /FREE flag was added in Igor Pro 10.00.
/QNo information printed in the history area.
/T=kDisplays results in a table. k specifies the table behavior when it is closed.
k =0:Normal with dialog (default).
k =1:Kills with no dialog.
k =2:Disables killing.
The table is associated with the test and not with the data. If you repeat the test, it will update the table with the new results unless you moved the output wave to a different data folder. If the named table exists but it does not display the output wave from the current data folder, the table is renamed and a new table is created.
/WSTR=waveListString
Specifies a string containing a semicolon-separated list of waves that contain sample data. Use waveListString instead of listing each wave after the flags.
/ZIgnores errors. V_flag will be set to -1 for any error and to zero otherwise.

Details

StatsCochranTest computes Cochran's statistic and compares it to a critical value from a Chi-squared distribution, which depends only of the significance level and the number of groups (columns). The null hypothesis for the test is that all columns represent the same proportion of the effect represented by a non-zero data.

The Chi-square distribution is appropriate when there are at least 4 columns and at least 24 total data points.

Dichotomous data are presumed to consist of two values 0 and 1, thus StatsCochranTest distinguishes only between zero and any nonzero value, which is considered to be 1; it does not allow NaNs or INFs. Input waves can be a single 2D wave or a list of 1D numeric waves, which can also be specified in a string list with /WSTR. In the standard terminology, data rows represent blocks and data columns represent groups. H0 corresponds to the assumption that all groups have the same proportion of 1's.

With the /T flag, it displays the results in a table that contains the number of rows, the number of columns, the Cochran statistic, the critical value, and the conclusion (1 to accept H0 and 0 to reject it).

V_flag will be set to -1 for any error and to zero otherwise.

See Also

Statistical Analysis, StatsFriedmanTest

Demos

Open Cochran-Test Demo.pxp