
07-08-2024
udo_sas
SAS Employee
Member since
06-23-2011
- 417 Posts
- 27 Likes Given
- 43 Solutions
- 196 Likes Received
-
Latest posts by udo_sas
Subject Views Posted 1539 06-14-2017 12:53 PM 968 05-25-2017 02:59 PM 1266 05-24-2017 08:00 AM 2316 05-19-2017 07:51 AM 2363 05-12-2017 08:45 AM 1409 04-12-2017 08:20 AM 1761 04-05-2017 09:18 AM 10025 03-22-2017 05:23 PM 2516 02-28-2017 01:55 PM 1128 02-20-2017 09:18 AM -
Activity Feed for udo_sas
- Got a Like for Re: use date in a select range. 07-06-2020 09:21 PM
- Liked Super Bowl 2021: Will the date be changed? for TammyJackson. 07-02-2020 12:30 PM
- Liked Forecasting and Econometrics sessions at AnalyticsX in San Diego for ShelleySessoms. 08-17-2018 02:45 PM
- Liked Hierarchical Forecasting with SAS® Visual Forecasting for solarflare. 10-05-2017 05:08 PM
- Posted Re: How does Box Cox parameters work? on SAS Forecasting and Econometrics. 06-14-2017 12:53 PM
- Posted Re: Forecast Studio: Forecasting view vs Modeling view on SAS Forecasting and Econometrics. 05-25-2017 02:59 PM
- Posted Re: Forecasting model introduction? on SAS Forecasting and Econometrics. 05-24-2017 08:00 AM
- Posted Re: how to import data in Forecast Studio? on SAS Forecasting and Econometrics. 05-19-2017 07:51 AM
- Posted Re: how to import data in Forecast Studio? on SAS Forecasting and Econometrics. 05-12-2017 08:45 AM
- Posted Re: Setting threshold for forecast on SAS Forecasting and Econometrics. 04-12-2017 08:20 AM
- Posted Re: How to forecast the new product? on SAS Forecasting and Econometrics. 04-05-2017 09:18 AM
- Got a Like for Re: convert month data to date data. 03-23-2017 06:05 AM
- Posted Re: Amihud (2002) Liquidity Measure on SAS Forecasting and Econometrics. 03-22-2017 05:23 PM
- Posted Re: Proc Expand - Convert statement on SAS Forecasting and Econometrics. 02-28-2017 01:55 PM
- Posted Re: Time Series Forecasting: Holt Winter Model(Additive) on SAS Forecasting and Econometrics. 02-20-2017 09:18 AM
- Posted Re: Testing High Frequency Seasonal Time Series for Stationarity on SAS Forecasting and Econometrics. 01-26-2017 10:21 AM
- Liked Re: Help with forecasting/prediction for Ksharp. 12-07-2016 07:07 AM
- Posted Re: FORECAST BASED ON HOURLY DATA on SAS Forecasting and Econometrics. 12-05-2016 05:30 PM
- Got a Like for Re: How do I Forecast? Understanding, panel data, arima. 12-03-2016 05:18 AM
- Posted Re: How do I Forecast? Understanding, panel data, arima on SAS Forecasting and Econometrics. 12-02-2016 01:58 PM
-
Posts I Liked
Subject Likes Author Latest Post 3 1 6 1 8 -
My Liked Posts
Subject Likes Posted 1 02-03-2012 04:03 PM 1 12-02-2016 01:58 PM 1 11-28-2016 06:21 PM 1 11-21-2016 08:24 AM 1 09-09-2016 04:49 PM
11-17-2016
08:00 AM
Hello -
Little known feature of ESM - from documentation: " If an ID statement is not specified, the observation number, with respect to the BY group, is used as the time ID.". With other words, this code will work too:
proc esm data=ts.Tax
outfor=ts.outTax outstat=ts.statTax
back=0 lead=5 print=all plot=all;
forecast Million / model=damptrend ;
run;
I took the liberty to change the default model (simple ESM) to a damp trend model, which seems to be more appropriate for your data.
Thanks,
Udo
... View more
10-17-2016
04:17 AM
Hello -
You may want to consider using PROC TIMESERIES instead.
For example:
proc timeseries data=work.risk out=work.want;
id date interval=month accumulate=mean;
var _numeric_;
run;
Thanks, Udo
... View more
09-09-2016
04:49 PM
1 Like
Hello -
SSM mastermind @rselukar point out to me that unevenly spaced time series are also called longitudinal data - there are 3 examples in PROC SSM documentation which deal with this type of situation:
http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ssm_examples04.htm
http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ssm_examples09.htm
http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ssm_examples15.htm
Furthermore he was kind enough to point me to PROC SSM documentation, that describes the types of sequential data SSM can handle:
http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ssm_details02.htm
And ouf course you may want to check out his SAS Global Forum paper: http://support.sas.com/resources/papers/proceedings15/SAS1580-2015.pdf on this very topic.
Many thanks Rajesh!
Udo
... View more
08-24-2016
05:32 PM
1 Like
Hello -
http://faculty.smu.edu/tfomby/eco5375/data/Exercises/Diebold-Mariano%20Test.sas (see also: http://faculty.smu.edu/tfomby/eco5375/data/Exercises/)
might get you started.
Thanks,
Udo
... View more
08-02-2016
08:57 AM
Hello -
As a point for consideration when going for a log transformation approach: given the nature of the exponential function the back-transformed forecasts could be behaving unexpectedly.
Thanks,
Udo
... View more
07-29-2016
09:00 AM
1 Like
Hello -
In my opinion you will need to deal with non-negativity requirements of your forecasts in a post processing step. The statistical model will provide you with an unconstrained forecast, based on the patterns at hand, which can be negative of course.
If, like in your case, you have additional requirements about the decisions at hand, like: forecasts cannot be negative (example: sales forecasting), forecasts need to be integer (example: number of call center agents), forecasts are impacted by supply options (example: inventory control, where products come in batches), etc. you will need to deal with them in a post process.
Some post-processing can be simple, like setting forecasts to 0, others can be more elaborate: overrides in a hierarchical setup with rules about what can be changed, which boil down to an optimization problem. Sometimes this is referred to as a constrained forecast.
Thanks,
Udo
PS: having said all of this you may want to make sure that your model is appropriate. I looked at your data briefly, maybe an ESM approach (using a damped trend model or a seasonal model for example) will do a better job - just a Friday morning thought.
Example:
data test;
input value;
datalines;
2501.3670464
2108.8958506
2891.8512364
3296.7321201
2152.0694575
2268.121497
1762.4315729
725.869754
1352.3058047
1116.6313661
1682.9098849
1352.5916422
1817.0154846
942.74009745
1809.1170823
1724.7927787
2132.5585948
1509.8093098
629.94039571
524.47316682
483.21510113
784.94561717
1678.526544
3958.0868899
2623.3232306
3431.4607677
2358.1385337
2552.8319758
2970.995978
1573.3429921
;
run;
proc esm data=test plot=(forecasts);
forecast value / model=damptrend;
run;
*assuming seasonality of 12;
proc esm data=test plot=(forecasts) seasonality=12;
forecast value / model=seasonal;
run;
... View more
07-27-2016
02:21 PM
Hello -
ARIMA documentation provides some information on how to deal with inputs here: https://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_arima_gettingstarted25.htm
Alternatively you may want to explore UCM - which will give you the benefit of being able to explain the impact of your inputs in a more straightforward manner than ARIMAX. See https://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_examples04.htm as an example.
ESM does not allow for inputs currently - we are working on this functionality, stay tuned.
Thanks,
Udo
... View more
07-12-2016
11:41 AM
Hello -
You may want to check out: https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/forecasting-Procedure-for-multiple-seasonality/m-p/134605/highlight/true#M798
Unfortunately PROC UCM (or SSM) is not available in TSFS, so you will have to switch to code.
You may find this paper of interest too: https://forecasters.org/submissions08/MorzuchBernardISF2008.pdf
Thanks,
Udo
... View more
07-11-2016
08:16 AM
Hello -
"I am using SAS Forecast Studio 13.1 for Desktop. So I cannot code and use any procedures?"
Correct.
"" And, I cannot automatically get the dynamic regression model specifications and forecasting, right?
You should see the automatic dynamic regression model specifications in model view.
Thanks,
Udo
... View more
06-29-2016
10:10 AM
Hello -
In addition to @alexchien's response I'd like to add: as ARIMA creates a common SAS data set one can use utility procedures such as DATASETS to modify attributes such as labels and names. For example if you would like to change both name and label of a variable produced by ARIMA this code snippet might be of interest.
Thanks,
Udo
proc arima data=sashelp.air;
identify var=air(1,12);
estimate q=(1)(12) noint method=ml;
forecast id=date interval=month out=work.want;
run;
proc datasets lib=work memtype=data nodetails nolist;
modify want;
attrib forecast label="Hello World";
rename forecast=MYNAME;
quit;
... View more
06-24-2016
10:18 AM
PS: I should have added: if you have access to SAS Forecast Server you will be able to incorporate R models as part of your workflow: http://blogs.sas.com/content/forecasting/2011/09/19/guest-blogger-udo-sglavo-on-including-r-models-in-sas-forecast-server-part-1-of-2/
If you don't have access to SAS Forecast Server, but SAS/IML and you'd like to run your R model in SAS, then check out: http://support.sas.com/documentation/cdl/en/imlug/68150/HTML/default/viewer.htm#imlug_r_toc.htm
... View more
06-24-2016
10:11 AM
Hello -
Correct, it's not the same thing.
We are working on adding these models in a later release.
Your best bet currently is to use SAS/IML I would think.
Thanks,
Udo
... View more
06-23-2016
02:48 PM
Hello -
Have you looked at the MODEL=DAMPTREND option of the FORECAST statement in PROC ESM?
Equations can be found here: http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_tffordet_sect021.htm
Thanks,
Udo
... View more
06-20-2016
02:21 PM
Hello -
Here are a couple of thoughts:
a) SAS Studio allows you to set default styles in a dialog - rather than using code. See: http://support.sas.com/documentation/cdl/en/webeditorug/68254/HTML/default/viewer.htm#p04pw81m36jmgyn1pnbyd65qkgtn.htm. You may be able to specify the style you want using the dialog and remove all ODS related statements from your code again.
b) If a) is not working, this could also be related to lack of write access rights - in this case you may be able to add a gpath option to your code, see: http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#n09h3f7dy6lxzcn137bo6oe3wjx3.htm
c) if a) and b) are failing - I'd suggest to reach out to Technical Support for a more thorough analysis of the issue you are running into.
Finally I'm wondering about your last data step:
data results;
set results;
passf = exp(forecast + 0.5*std**2);
passlcl = exp(lcl);
passucl = exp(ucl);
if _n_ > 55;
keep obs forecast std lcl ucl passf passlcl passucl;
run;
which seems to result in data set with 0 observations.
You may want to try:
data results;
set results;
if ^missing(forecast) then do;
passf = exp(forecast + 0.5*std**2);
passlcl = exp(lcl);
passucl = exp(ucl);
end;
keep obs forecast std lcl ucl passf passlcl passucl;
run;
instead.
Thanks,
Udo
... View more
06-20-2016
11:34 AM
Hello -
http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_odsgraph_toc.htm might be useful.
If you can share the error message you see, we may be able to provide some more guidance.
Thanks,
Udo
... View more