定性资料的统计描述与推断2×2 表多层2×2 表2×R 表多层2×R 表R×C 表非参数方法的CMH 解法2×2 表Chisq Exact OR and RR McNemar 2×2 表data bronchit; input treat$ outcome$ count; cards; jiang y 70 jiang n 263 dan y 102 dan n 180 ; proc freq order=data; weight count; tables treat*outcome/chisq; run; D3p1.prg D3p2a.prg D3p2b.prg 多层2×2 表见CMH 程序2×R 表见程序2R rowmeanscores 2Rrank 2R scores Row mean scores data cough; input treat$ response$ count@@; cards; test none 5 test improve 24 test notable 45 test cure 15 control none 4 control improve 23 control notable 39 control cure 18 ; proc freq order=data; weight count; tables treat*response/chisq CMH; RUN; RANK data cough; input treat$ response count@@; cards; test 1 5 test 2 24 test 3 45 test 4 15 control 1 4 control 2 23 control 3 39 control 4 18 ; 多层2×R 表Data cough2r; input center$; do i=1 to 2; input treat$; do j=1 to 4 ; input response$ count@@; output; end; end; 行×列表行和列变量都是名义变量行为名义变量列为顺序变量行和列都是顺序变量行和列变量都是名义变量data cat5_1; input type$ disease$ count@@; cards; o ulcer 98 o cancer 38 o control 289 a ulcer 67 a cancer 41 a control 262 b ulcer 13 b cancer 8 b control 57 ab ulcer 18 ab cancer 12 ab control 30 ; proc freq order=data; weight count; tables type*disease/chisq nopercent norow nocol; run; 行为名义变量列为顺序变量data cat5_2; input type$; do i=1 to 4; input effect$ count@@; output; end; cards; Simple asthma none 13 some 30 marked 18 control 65 none 18 some 36 marked 16 ontrol 77 Simpemph asthemph none 11 some 23 marked 6 control 42 none 36 some 47 marked 11 control 94 ; proc freq order=data; weight count; tables type*effect/chisq cmh nopercent nocol norow; run; 行列均为顺序变量Data cat5_3; Input silicos density count@@; Cards; 1 1 43 1 2 188 1 3 14 2 1 1 2 2 96 2 n3 72 3 1 6 3 2 17 3 3 55 ; Run; 行列为顺序变量且属性相同见程序agree 单向有序列联表与秩和检验两样本秩和检验CMH 见mouse 程序完全随机化设计资料的检验(H检验)见程序cat6_2scorerank(complete) 见程序block scorerank 练习用SAS 软件分析:练习6.2 ,6.4 ,6.5 ,练习7.3 ,7.5 ,7.6 ,8.1 ,10.1 (回归分析做);然后将程序压缩到文件夹(文件夹名为姓名),并发至邮箱qzj200410@163.com 。* proc freq ; tables treat*response/cmh scores=rank; weight count; RUN; proc npar1way; class treat; var response; freq count; run; cards;; one test none 7 improve 11 notable 8 cure 4 control none 2 improve 13 notable 13 cure 2 two test none 2 improve 7 notable 22 cure 9 control none 0 improve 6 notable 20 cure 14 three test none 5 improve 9 notable 13 cure 3 control none 6 improve 9 notable 15 cure 0 ; run; proc freq order=data; weight count; tables center*treat*response/cmh; run; 一致性检验、特殊模型分析双向有序XY 为有序变量且属性相同相关分析,线性趋势检验双向有序XY 为有序变量且属性不同秩和检验,CPD ,Ridit 分析单向有序XY 之一为名义变量且属性不同检验,Fisher 精确概率法双向无序XY 皆为名义变量且属性不同统计分析方法列联表分类变量的统计性质及其专业属性列联表的分类及其使用的统计分析方法Proc corr spearman; Freq count; Var silicos density; Run; Proc freq; Weight count; Tables silicos*density/cmh nopercent norow nocol; Run; *
下载此电子书资料需要扣除0点,