STATA,SAS,SPSS实现分层定群研究(cmh)
STATA程序: bd:breslow-day test一致性卡方检验,仅在cc命令中使用
SAS程序:
data demo;
do layer= 1 to 2;
do case= 1 to 2;
do expose=1 to 2;
input n@@;
output;
end;
end;
end;
cards;
8 598 115 22 16 76 79
;
proc freq;
weight n;
tables layer*expose*case/cmh nopct norow nocol;
run;
程序结果
Cochran-Mantel-Haenszel Statistics (Based on Table Scores)
Statistic Alternative Hypothesis DF Value Prob
1 Nonzero Correlation 1 1.9779 0.1596
2 Row Mean Scores Differ 1 1.9779 0.1596
3 General Association 1 1.9779 0.1596
Estimates of the Common Relative Risk (Row1/Row2)
Type of Study Method Value 95% Confidence Limits
Case-Control Mantel-Haenszel 1.5440 0.8411 2.8345
(Odds Ratio) Logit 1.5427 0.8397 2.8344
Cohort Mantel-Haenszel 1.2236 0.9439 1.5864
(Col1 Risk) Logit 1.2296 0.9492 1.5928
Cohort Mantel-Haenszel 0.7922 0.5581 1.1244
(Col2 Risk) Logit 0.7961 0.5613 1.1290
Breslow-Day Test for
Homogeneity of the Odds Ratios
Chi-Square 0.1561
DF 1
Pr > ChiSq 0.6928
Total Sample Size = 419
SPSS过程:
页:
[1]