Hi All,
I am trying to find the time series which has level change behavior using PROC SSM using following code.
I am getting the output in ODS window, but how can I write the output in a sas table and use it directly for flagging the level change point.
proc ssm data=WORK.sales data plot=maxshock;
id date interval=week;
trend irw(ll) variance=0 checkbreak;
state seasonState(1) type=season(length=52)
cov(g) checkbreak(overall);
comp season = seasonState[1];
irregular wn;
model sale_qty =irw season wn;
output out=breakFor;
run;
Any help will be appreciated
Thanks
Ankush
Hello,
Every single output object (be it a table or a graph / plot) can be captured in a SAS dataset!!
Use
ODS TRACE ON;
to know about the name of all the output objects (they are published in the log-screen in order of appearance).
Some examples from PROC GLM:
Output Added:
-------------
Name: ModelANOVA
Label: Type III Model ANOVA
Template: stat.GLM.Tests
Path: GLM.ANOVA.Weight.ModelANOVA
-------------
Output Added:
-------------
Name: BoxPlot
Label: Box Plot
Template: Stat.GLM.Graphics.FitBoxPlot
Path: GLM.ANOVA.Weight.BoxPlot
-------------
Then use
ODS OUTPUT objectname=datasetname;
to capture what you're interested in.
Full example:
ods trace on;
ods output ModelANOVA=work.ModelANOVA;
proc glm data=sashelp.class;
class sex;
model weight=sex;
run;
QUIT;
ods trace off;
The LOG says:
NOTE: The data set WORK.MODELANOVA has 2 observations and 8 variables.
Hope this helps!
Koen
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.