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
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.