Calculates the gamma statistic of agreement for ordinal data (A.W. Gordon).
|Whether to print the statistic with its associated information and the resulting test (
||Type of test required (
||Tables of data each classified by the two variables (factors) of interest|
||Save the value of gamma for each data table|
||Save the corresponding variances|
The gamma statistic (Siegel & Castellan 1988, pages 291-298) provides a way of assessing the agreement between two variables measured using ordinal scales. In Genstat these would each be represented as factors whose levels represent a ranking of the individuals according to some measurement.
For example, suppose we have a factor
A with r levels and a factor
B with k levels. The data for
GSTATISTIC, specified by the
DATA parameter, consists of an r by k table classified by
B, whose entries indicate the number of times that the ith level of variable
A occurs with the jth level of variable
B. The table must not contain any missing values. The statistic has the value 1 when there is no disagreement in the ordering of the variables, -1 if the ordering defined by
A has no disagreement with the reverse of the ordering defined by
B, and zero if the variables are independent.
The printing of the test statistic and its associated information is controlled by the
test, the procedure prints the number of times that the variables agree and disagree, the resulting value of gamma and its variance. When the number of observations N is large, the sampling distribution of gamma is approximately Normal. The procedure thus also prints the value of gamma divided by the variance, and its probability assuming a Normal distribution. A warning is printed if N is less than 20.
The test is assumed to be two-sided (i.e. no prior knowledge is assumed about the type of association) unless otherwise requested by the
METHOD option. Setting
METHOD=positive will give a one-sided test of the null hypothesis that there is a positive association. Similarly,
METHOD=negative will produce a one-sided test that there is a negative association.
VARIANCE parameters allow gamma and its variance to be saved, in scalars.
The method used is as described in Siegel & Castellan (1988, pages 291-298).
Siegel, S. & Castellan, N.J. (1988). Nonparametric Statistics for the behavioural sciences (second edition). McGraw-Hill, New York.
Commands for Basic and nonparametric statistics.
CAPTION 'GSTATISTIC example',\ 'Data from Siegel & Castellan (1988) p. 296'; STYLE=meta,plain FACTOR [LABELS=!t('Successful quitter','In-process quitter',\ 'Unsuccessful quitter')] Ability & [LABELS=!t('1','2-4','5-9','10-14','15-19','20-25','>25')] Time TABLE [CLASSIFICATION=Ability,Time; VALUES=13,29,26, 22,9,8, 8,5,2,\ 6,2,1, 3,0,1, 9,16,14, 21,16,29] Nurses PRINT Nurses; FIELD=6; DECIMALS=0 GSTATISTIC Nurses