BookmarkSubscribeRSS Feed
ankush2301
Calcite | Level 5

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

1 REPLY 1
sbxkoenk
SAS Super FREQ

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

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1376 views
  • 0 likes
  • 2 in conversation