Statistical Analysis for Education and Psychology Researchers

(Jeff_L) #1

/ per
line
/
/ see notes
above
/
1 0 1
1 1 1
0 1 1
0 0 0 /*
1 1 0
0 0 1
0 0 1
0 0 1
;
Do not edit
beyond this
line
;
%macro cochran;


Find number of groups and
store in macro var j
;
%global j;
Proc transpose data=a out=trans;
run;
data null;
if 0 then set trans
nobs=count;
call symput (‘j’, left
(put (count, 8.)));
stop;
run;
data a;
set a end = eof;
n+sum (of t1 −
t&j); Find
n
;
sumr2 + (sum(of t1 −
t&j)2); Find sum r
squared ;
%do i=1 %to &j;
c&i +
t&i;

Find totals for c ;
if eof then do;
c2&i=c&i
2;
end;
%end;
if eof then do;


Appendix 367
Free download pdf