DATA example5_2;    
DO path=1 TO 4;          /*定义行变量，表明path有4行*/
DO hp=1 TO 2;            /*定义列变量，表明hp有2列*/
INPUT f@@;    
OUTPUT;
END;
END;
CARDS;
413 609
29 190
182 677
120 426
;
PROC FREQ;     
WEIGHT f;    
TABLE path*hp/nopercent nocol chisq;    
/* nopercent表示不输出总百分比，nocol表示不输出列百分比输出，chisq选项调用卡方检验结果*/
RUN; 
PROC FREQ;  
WEIGHT f; 
TABLE path*hp/nopercent nocol chisq trend; 
RUN; 
