Hello , please I work on PROC VARMA , I want to forecast with daily data , from 2020Jun1,2020Jun2, ,,,,, , 2021Dec31. how can I write the format daily data . thanks
Hello @SystemsasdD2019 ,
I have moved your question to the "SAS Forecasting and Econometrics" board.
Do you mean PROC VARMAX?
In the PROC VARMAX, you need the ID statement with interval=DAY.
PROC VARMAX options;
ID variable INTERVAL=value <ALIGN=value>;
Or do you want to know how to convert a string like '2021Dec31' into a real SAS date?
Cheers,
Koen
Hello, thanks for answering , I want to know how to convert a string like , 2021Jun1 ... .... 2021Dec31'into a real SAS date,
data _NULL_;
LENGTH DateStringToConvert DateStringToConvert1 $ 9;
DateStringToConvert ='2021Jun1' ;
DateStringToConvert1=trim(substr(DateStringToConvert,8,2))!!substr(DateStringToConvert,5,3)!!substr(DateStringToConvert,1,4);
put DateStringToConvert1=;
RealSASdate=input(DateStringToConvert1,date9.);
put RealSASdate=;
put RealSASdate= date9.;
DateStringToConvert='2021Dec31';
DateStringToConvert1=trim(substr(DateStringToConvert,8,2))!!substr(DateStringToConvert,5,3)!!substr(DateStringToConvert,1,4);
put DateStringToConvert1=;
RealSASdate=input(DateStringToConvert1,date9.);
put RealSASdate=;
put RealSASdate= date9.;
run;
/* end of program */
Koen
hello, excuse , I could not implement this formula , Is there a simpler formula .
Hello,
Using PROC FORMAT and a picture statement, it is really easy to create ANY format for a date.
But it is more difficult to create any INformat for a date.
I will have a look in the coming week (workdays).
Thanks,
Koen
hello, excuse , can you show me how Using implement PROC FORMAT and a picture statement, with thanks
See here for examples :
Paper 101-27
Have a Strange DATE? Create your own INFORMAT to Deal with Her
Venky Chakravarthy, Ann Arbor, MI
https://support.sas.com/resources/papers/proceedings/proceedings/sugi27/p101-27.pdf
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 save with the early bird rate—just $795!