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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.