0

正如标题所示,我想知道有没有一种方法可以在数据集中打印 Somers'D 统计数据和预测变量的 p 值x

您只需运行以下命令即可获得此类统计信息:

ODS TRACE ON;
PROC LOGISTIC DATA = BETTING.TRAINING_DUMMIES NOPRINT; 
    MODEL Z1 (EVENT = '1') = D_INT_LNGAP_1;
        OPTIONS;
RUN;

ODS TRACE OFF;

ODS OUTPUT FITSTATISTICS=FITDS;
PROC LOGISTIC DATA = BETTING.TRAINING_DUMMIES NOPRINT; 
    MODEL Z1 (EVENT = '1') = D_INT_LNGAP_1;
        OPTIONS;
RUN;

如果我运行与此处建议的代码类似的代码,我只会得到 AIC、SIC,最后是 LR 统计数据,并且在 SAS日志中我发现:

10   ODS TRACE ON;
11
12   PROC LOGISTIC DATA = BETTING.TRAINING_DUMMIES NOPRINT;
13       MODEL Z1 (EVENT = '1') = D_INT_LNGAP_1;
14           OPTIONS;
15   RUN;

NOTE: PROC LOGISTIC is modeling the probability that z1=1.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 3968 observations read from the data set BETTING.TRAINING_DUMMIES.
NOTE: PROCEDURE LOGISTIC used (Total process time):
      real time           0.07 seconds
      cpu time            0.04 seconds


16
17   ODS TRACE OFF;

在第一段代码中,而在第二段中我发现以下内容:

18   ODS OUTPUT FITSTATISTICS=FITDS;
NOTE: Writing HTML Body file: sashtml.htm
19   PROC LOGISTIC DATA = BETTING.TRAINING_DUMMIES NOPRINT; 
20       MODEL Z1 (EVENT = '1') = D_INT_LNGAP_1;
21           OPTIONS;
22   RUN;

NOTE: PROC LOGISTIC is modeling the probability that z1=1.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: There were 3968 observations read from the data set BETTING.TRAINING_DUMMIES.
NOTE: PROCEDURE LOGISTIC used (Total process time):
      real time           0.04 seconds
      cpu time            0.04 seconds

WARNING: Output 'FITSTATISTICS' was not created.  Make sure that the output object name, label,
         or path is spelled correctly.  Also, verify that the appropriate procedure options are
         used to produce the requested output object.  For example, verify that the NOPRINT
         option is not used.

你们中的一些人可以建议一种在新数据集中打印此类统计数据的方法?

任何帮助将不胜感激。

谢谢!

4

1 回答 1

1

我不知道你为什么没有得到 ODS TRACE 输出。我会重新启动您的 SAS 版本或将其报告给 SAS。

您需要的表称为 Association 和 ParameterEstimates。Somer 的 D 要求创建 Odds Ratio 语句。

ods trace on;
ods output association=somers parameterestimates=pe;
proc logistic data=sashelp.heart;
model status=ageatstart;
oddsratio ageatstart;
run;
ods trace off;
于 2016-06-03T23:02:04.933 回答