FREQ过程产生一维到n维频数表和交叉(列联) 表。对于二维表PROC FREQ 计算检验和属性的度量。对于n维表PROC FREQ 做分层分析、计算层内统计量, 交叉、分层、频数和统计量同样能输出到SAS数据集。
PROC FREQ能计算一维频数表相等比率、特殊比率或二项式比率统计量检验。 PROC FREQ 能计算任何分层变量列联表在两个分类变量调整之间关系检验的各种统计量。 PROC FREQ 自动显示输出在报告中,并且也能存输出在SAS数据集中。
某些配对变量,可以检验任何变量之间关系的存在或相关的强度。如果关系存在的话,决定计算卡方检验、估计相关的强度, 等
∙卡方检验和度量
∙属性的度量
∙风险 (二项式比率) 和2×2 表的风险差
∙2×2 表比数比和相对危险
∙趋势检验
∙检验和一致性的度量
∙CMH统计量
The following statements are available in PROC FREQ.
PROC FREQ < options > ;
BY variables ;
EXACT statistic-options < / computation-options > ;
OUTPUT < OUT=SAS-data-set > options ;
TABLES requests < / options > ;
TEST options ;
WEIGHT variable < / option > ;
EXACT指定统计量的确切检验或置信限,
Option | Exact Statistics Computed |
AGREE | 2 ×2表的 McNemar's 检验, 简单的kappa系数, 和加权的kappa系数 |
BINOMIAL | 一维表的二项式比例检验 |
CHISQ | variable used in lambda 一维表的拟合优度检验; 二维表的Pearson 卡方,似然比卡方, 和 Mantel-Haenszel卡方检验 |
COMOR | h ×2 ×2表公共的OR置信限; 公共的OR检验 |
FISHER | Fisher's 精确检验 |
JT | Jonckheere-Terpstra 检验 |
KAPPA | 简单的kappa系数检验 |
LRCHI | 似然比卡方检验 |
MCNEM | McNemar's检验 |
MEASURES | Pearson 相关和 Spearman相关检验, 和2 ×2表OR置信限 |
MHCHI | Mantel-Haenszel卡方检验 |
OR | 2 ×2 表OR值的置信限 |
PCHI | Pearson卡方检验 |
PCORR | Pearson相关系数检验 |
SCORR | Spearman相关系数检验 |
TREND | Cochran-Armitage趋势检验 |
WTKAP | 加权kappa系数检验 |
Computation-Options:
ALPHA= 指定Monte Carlo p-值估计置信限的水平。ALPHA= 值必须在0到1之间,默认值是0.01。
MAXTIME=value
指定计算精确p-值的最大时间。
MC
要求 Monte Carlo精确p-值估计代替直接p-值计算。
N=n
指定Monte Carlo估计样本数
POINT
要求检验统计量的精确点概率。
SEED=number
为Monte Carlo估计随机数发生指定初始种子。
OUTPUT < OUT= SAS-data-set > options ;
OUTPUT Statement Options and Required TABLES Statement Options
Option | Output Data Set Statistics | Required TABLES Statement Option |
AGREE | McNemar's test for 2 ×2 tables, simple kappa coefficient, and weighted kappa coefficient; for square tables with more than two response categories, Bowker's test of symmetry; for multiple strata, overall simple and weighted kappa statistics, and tests for equal kappas among strata; for multiple strata with two response categories, Cochran's Q test | AGREE |
AJCHI | 2 ×2表连续校正χ2 | ALL or CHISQ |
ALL | all statistics under CHISQ, MEASURES, and CMH, and the number of nonmissing subjects | ALL |
BDCHI | Breslow-Day test | ALL or CMH or CMH1 or CMH2 |
BIN | BINOMIAL | for one-way tables, binomial proportion statistics | BINOMIAL |
CHISQ | chi-square goodness-of-fit test for one-way tables; for two-way tables, Pearson chi-square, likelihood-ratio chi-square, continuity-adjusted chi-square for 2 ×2 tables, Mantel-Haenszel chi-square, Fisher's exact test for 2 ×2 tables, phi coefficient, contingency coefficient, and Cramer's V | ALL or CHISQ |
CMH | Cochran-Mantel-Haenszel correlation, row mean scores (ANOVA), and general association statistics; for 2 ×2 tables, logit and Mantel-Haenszel adjusted odds ratios, relative risks, and Breslow-Day test | ALL or CMH |
CMH1 | same as CMH, but excludes general association and row mean scores (ANOVA) statistics | ALL or CMH or CMH1 |
CMH2 | same as CMH, but excludes the general association statistic | ALL or CMH or CMH2 |
CMHCOR | Cochran-Mantel-Haenszel correlation statistic | ALL or CMH or CMH1 or CMH2 |
CMHGA | Cochran-Mantel-Haenszel general association statistic | ALL or CMH |
CMHRMS | Cochran-Mantel-Haenszel row mean scores (ANOVA) statistic | ALL or CMH or CMH2 |
COCHQ | Cochran's Q | AGREE |
CONTGY | contingency coefficient | ALL or CHISQ |
CRAMV | Cramer's V | ALL or CHISQ |
EQKAP | test for equal simple kappas | AGREE |
EQWKP | test for equal weighted kappas | AGREE |
FISHER | EXACT | Fisher's exact test | ALL or CHISQ * |
GAMMA | gamma | ALL or MEASURES |
JT | Jonckheere-Terpstra test | JT |
KAPPA | simple kappa coefficient | AGREE |
KENTB | Kendall's tau-b | ALL or MEASURES |
LAMCR | lambda asymmetric (C|R) | ALL or MEASURES |
LAMDAS | lambda symmetric | ALL or MEASURES |
LAMRC | lambda asymmetric (R|C) | ALL or MEASURES |
LGOR | adjusted logit odds ratio | ALL or CMH or CMH1 or CMH2 |
LGRRC1 | adjusted column 1 logit relative risk | ALL or CMH or CMH1 or CMH2 |
LGRRC2 | adjusted column 2 logit relative risk | ALL or CMH or CMH1 or CMH2 |
LRCHI | likelihood-ratio chi-square | ALL or CHISQ |
MCNEM | McNemar's test | AGREE |
MEASURES | gamma, Kendall's tau-b, Stuart's tau-c, Somers' D (C|R), Somers' D (R|C), Pearson correlation coefficient, Spearman correlation coefficient, lambda asymmetric (C|R), lambda asymmetric (R|C), lambda symmetric, uncertainty coefficient (C|R), uncertainty coefficient (R|C), and symmetric uncertainty coefficient; for 2 ×2 tables, odds ratio and relative risks | ALL or MEASURES |
MHCHI | Mantel-Haenszel chi-square | ALL or CHISQ |
MHOR | adjusted Mantel-Haenszel odds ratio | ALL or CMH or CMH1 or CMH2 |
MHRRC1 | adjusted column 1 Mantel-Haenszel relative risk | ALL or CMH or CMH1 or CMH2 |
MHRRC2 | adjusted column 2 Mantel-Haenszel relative risk | ALL or CMH or CMH1 or CMH2 |
N | number of nonmissing subjects for the stratum | |
NMISS | number of missing subjects for the stratum | |
OR | odds ratio | ALL or MEASURES or RELRISK |
PCHI | chi-square goodness-of-fit test for one-way tables; for two-way tables, Pearson chi-square | ALL or CHISQ |
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论