我正在尝试在 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;
我可以将迭代次数附加到 outfor 数据集,但我不知道它有什么好处。我如何自动化这个。请帮我解决这个问题。