SAS 单变量将所有测试放入 1 table

SAS Univariate put all tests into 1 table

我有以下代码用于计算各种测试

proc univariate data=Work.SortTempTableSorted;
    ODS select "Goodness of Fit";
    var price_change_sd;

    histogram price_change_sd / normal(mu=est sigma=est)
                                gamma(alpha=est sigma=est theta=0)
                                lognormal(sigma=est theta=0 zeta=est)
                                weibull(c=est sigma=est theta=0);
    by has_activity;
run;

这实质上是在由标志 "has_activity" 分区的变量上运行分布测试。这里的输出是一系列 table,我需要手动滚动直到找到我需要的。

我想知道我是否可以以某种方式将所有测试结果输出到一个 table 中并滚动浏览它。我知道我可以指定 "OUTTABLE" 但这只有正态分布的结果。

你很接近。请改用 ods output GoodnessOfFit;。使用 sashelp.cars 查看此示例。这会产生一个 table 和所有拟合优度估计值。

proc univariate data=sashelp.cars;
    var horsepower;

    histogram horsepower / normal(mu=est sigma=est)
                           gamma(alpha=est sigma=est theta=0)
                           lognormal(sigma=est theta=0 zeta=est)
                           weibull(c=est sigma=est theta=0);

    by make;

    ods output GoodnessOfFit;
run;