SAS上机练习题(全部-含参考答案)

第四题

data a4; input x1 x2; cards; 16.84 16.79 19.02 19.22 10.44 10.40 14.87 15.14 22.31 21.89 24.83 24.82 26.89 27.00 31.06 31.42 36.76 36.07 41.67 40.99 ; run;

proc ttest data=a4 ; paired x1*x2; run;

卡方检验 p159 例9.2 例9.3 例9.2, 2×2表,卡方检验

data a1;

do row=1 to 2; do col=1 to 2; input f@@; output; end; end; cards; 64 21 51 33 ; run;

proc freq data=a1 ; tables row*col/chisq; weight f; run;

例9.4 精选

例9.3,2×2表,校正卡方或Fisher精确检验

data a2;

input row col f; cards; 1 1 2 1 2 10 2 1 14 2 2 14 ; run;

proc freq data=a2 ; tables row*col/chisq; weight f; run;

例9.4,3×2表,卡方检验

data a3;

do row=1 to 3; do col=1 to 2; input f@@; output; end; end; cards; 35 5 20 10 7 25 ; run;

proc freq data=a3 ; tables row*col/chisq; weight f; run;

精选

秩和检验 p179 例10.2例10.6 p193 7题 例10.2,配对秩和检验

data a1; input x1 x2; d =x1-x2; cards; 10.5 8.8 21.6 18.8 14.9 13.5 30.2 27.6 8.4 9.1 7.7 7.0 16.4 14.7 19.5 17.2 127.0 155.0 18.7 16.3 9.5 9.5 ; run;

proc univariate data=a1; var d; run;

例10.6,等级资料,秩和检验

data a2;

do row=1 to 4; do col=1 to 3;

input f@@; output; end; end; cards; 24 20 20 26 16 22 72 24 14 186 32 22 ;

proc npar1way data=a2 wilcoxon; class col; var row; freq f; run;

精选

p193 7题,等级资料,配对设计,用Friedman检验

data a3;

do id=1 to 10; do grp= 1 to 2; input x$ @@;

if x=\治愈\ then x1=3; if x=\有效\ then x1=2; if x=\无效\ then x1=1; output; end; end; cards;

治愈 有效 有效 无效 治愈 有效 治愈 治愈 有效 有效 治愈 有效 治愈 无效 治愈 有效 有效 无效 治愈 治愈 ;

proc freq data=a3;

table id*grp*x1/cmh scores=rank noprint; run;

精选

(彭斌,2010-4-18)

SAS上机练习题(三)

1、(方差分析)某研究人员研究3种刺激因素(高葡萄糖、高胰岛素和过氧化氢)刺激大鼠肾小球系膜细胞对单核细胞趋化蛋白表达的影响,在四种条件下对大鼠肾小球系膜细胞进行培养,检测结果如表1。

表1 不同刺激因素作用下蛋白表达结果

分组 对照组 高葡萄糖组 高胰岛素组 过氧化氢组

0.3547 1.2247 1.1453 1.3582

表达结果(光密度值) 0.3652 1.2354 1.1526 1.3657

0.3842 1.2136 1.1375 1.3518

0.3598 1.2286 1.1547 1.3259

0.3742 1.2415 1.1294 1.3726

0.3925 1.2275 1.1659 1.3318

问题1:计算每一组的平均光密度,观察各个组间均数的差异大小;

问题2:进行方差分析,将结果整理成方差分析表,观察变异、均方及F值之间的关系; 问题3:分别采用SNK法和Dunnett法进行多重比较; 问题4:对上述结果进行解释。

参考程序: data a;

do grp=1 to 4; do i=1 to 6; input x@@; output; end; end; cards;

0.3547 0.3652 0.3842 0.3598 0.3742 0.3925 1.2247 1.2354 1.2136 1.2286 1.2415 1.2275 1.1453 1.1526 1.1375 1.1547 1.1294 1.1659 1.3582 1.3657 1.3518 1.3259 1.3726 1.3318 ; 或者 data a;

length grp $10; input grp $ @@; do i=1 to 6;

input x@@; output; end; cards;

对照组 0.3547 0.3652 0.3842 0.3598 0.3742 高葡萄糖组 1.2247 1.2354 1.2136 1.2286 1.2415 高胰岛素组 1.1453 1.1526 1.1375 1.1547 1.1294 过氧化氢组 1.3582 1.3657 1.3518 1.3259 1.3726 ;

精选

0.3925 1.2275 1.1659 1.3318

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4