我正在尝试在Proc UCM中运行各种预测变量组合的多次迭代(5400)。包含所有变量组合的SAS代码已使用csharp等外部编程代码顺序生成。
我认为这可以在SAS中完成,但这是下一次的主题。
我想将所有迭代的所有参数估计编译成一个表,并且除了不规则分量之外,所有"平滑估计的所有分量的总和"进入另一个并在其上写下一些条件。
目前我正在将所有输出写入csv并没有好处。我只知道我可以使用ODS选项并指定" ParameterEstimates"和" SmoothedAllExceptIrreg"但要完成整个5400次迭代是我无法弄清楚的。
我的4次迭代的示例代码如下(1347 1348 1349 1350是基于组合顺序生成的迭代):
/ 有方差的水平,没有方差的季节,没有方差的斜率 /
ods csv file = "D:\SAS\Iteration_Hair_Care_Volume_1347.csv";
proc ucm data = project.Compiled printall;
irregular ;
level ;
forecast lead = 8 alpha = 0.05 outfor = project.Compiled_Output_Hair;
model
HC =
Gr_CPI
gdp;
season length=4
var = 0 noest;
slope
var = 0 noest;
where count > 36;
run;
quit;
ods csv.close;
/*Level with variance,Season without variance,Slope with Variance*/
ods csv file = "D:\SAS\Iteration_Hair_Care_Volume_1348.csv";
proc ucm data = project.Compiled printall;
irregular ;
level ;
forecast lead = 8 alpha = 0.05 outfor = project.Compiled_Output_Hair;
model
HC =
Gr_CPI
Earning_Avg_Lag;
season length=4
var = 0 noest;
slope ;
where count > 36;
run;
quit;
ods csv.close;
/*Level with variance,Season with variance,Slope without Variance*/
ods csv file = "D:\SAS\Iteration_Hair_Care_Volume_1349.csv";
proc ucm data = project.Compiled printall;
irregular ;
level ;
forecast lead = 8 alpha = 0.05 outfor = project.Compiled_Output_Hair;
model
HC =
Gr_CPI
pdi
season length=4 ;
slope
var = 0 noest;
where count > 36;
run;
quit;
ods csv.close;
/*Level with variance,Season with variance,Slope with Variance*/
ods csv file = "D:\SAS\Iteration_Hair_Care_Volume_1350.csv";
proc ucm data = project.Compiled printall;
irregular ;
level ;
forecast lead = 8 alpha = 0.05 outfor = project.Compiled_Output_Hair;
model
HC =
Gr_CPI
IIP;
season length=4 ;
slope ;
where count > 36;
run;
quit;
ods csv.close;
我可以将迭代数附加到数据集中,但我不知道它有什么好处。我如何自动化这个。请帮助我。