Statistical Analysis for Education and Psychology Researchers

(Jeff_L) #1

sumc2=sum (of
c21−c2&j); sum c
squared
;
find cochran q ;
q=
((&j−1)(&jsumc2−(n2)))/((&j
n)−sumr2) ;
numobs=
n;
find no. of observations
;
output;
end;
evaluate q ;
data null;
set a;
rowcol=&j

numobs;

number of cells ;
file print;
put @25 'Cochran Q Test
Results'//;
if rowcol < 24 then do;
put @15 'CAUTION – the
number of cells is less than
24'/;
end;
conscv5 = (&j −
1)*3.84; * 5% conservative
critical value
conscv1 = (&j −
1)
6.63;
1% conservative
critical value
libdf=&j−1;
liberal
df
lib=1 −
round(probchi(q,libdf), .001)
;
find p-value **;
q=round (q, .001);


put @20 'Cochran Q test value
='q / /;
put @20 'p-value with liberal
df:' / ;
put @20 'df=' libdf /;
if lib <=0.01 then
put @20 'p <=0.01
(p-value= 'lib')' / /;
else if lib <=0.05 then
put @20 'p <=0.05
(p-value=' lib')' / /;


Appendix 368
Free download pdf