Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/198.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SAS单变量将所有测试放入1个表中_Sas_Distribution - Fatal编程技术网

SAS单变量将所有测试放入1个表中

SAS单变量将所有测试放入1个表中,sas,distribution,Sas,Distribution,我有以下用于计算各种测试的代码 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)

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

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”分区的变量运行分布测试。这里的输出是一系列表,我需要手动滚动这些表,直到找到我需要的


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

您很接近。使用
ods输出GoodnessOfFit取而代之。使用sashelp.cars查看此示例。这将生成一个包含所有拟合优度估计的表

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;

ODS OUTPUT语句中有一个PERSIST选项,允许您在ODS输出没有自动生成的情况下,按变量对ODS输出进行堆栈。这仍然为我提供了每个表和单独的绘图。我真的只想将所有测试结果输出到一个表中,然后按最佳拟合对每个分组进行排序。检查工作库中名为“GoodnessOfFit”的表。所有测试和组都在该表中。