Statistical Analysis for Education and Psychology Researchers

(Jeff_L) #1

issues following their MEd course (see Figure 6.1), this data can be entered into a SAS
programme using the following lines of code:


data chi;
input row col celln @@;
cards;
1 1 21 1 2 27 2 1 10 2 2 69
;

The first three values in the data lines, 1121 refer to row 1 (row variable on the input
line), col 1 (col variable on the input line) cell frequency value 21 (celln variable on the
input line). The double trailing at sign, @@, is used because the input data line, 1 121 1 2
27 2 1 10 2 2 69, contains data values for more than one variable and more than one
observation. In this example, there are three variables (row, col, celln) and four
observations (the frequency count for each cell). The weight statement when used with
PROC FREQ specifies the variable that contains the cell frequencies. The SAS code is:


proc freq data=chi;
weight celln;
table row*col/nopercent chisq;
title 'Chi square test for gender (row var) and
understanding (col var)' ;
run;

The complete programme is shown in Figure 5, Appendix A3.


Interpretation of Computer Output

Output from the Chi-square programme for the teachers’ data is shown in Figure 6.3. For
clarity of presentation only the relevant sections of output are illustrated.
Chi square test for gender (row var) and understanding (col var)
Table of row by col
Row col^
Frequency^
Row Pct^
Col Pct 1 2 Total
1 21 27 48
43.75 56.25
67.74 28.12
2 10 69 79
12.66 87.34
32.26 71.88
Total 31 96 127
Statistics for table of row by col
Statistic DF Value Prob


Inferences involving binomial and nominal count data 171
Free download pdf