I would like to use SAS FS to run an illustrating example in which the time variable is 1,2,3,4... Is there any way in the forecasting view the time-axis shows 1,2,3,4 rather than any strange years...
Hello -
Please note that @PGStats's suggestion will only work if you use the SAS Forecast Server procedures.
From documentation:
Requirements for Time Series Data
To generate forecasts in SAS Forecast Studio, you need time series data. You might already have this time series data, or you might have transactional data. If you have transactional data, you can use the accumulation options in SAS Forecast Studio to convert the transactional data into a time series.
Your time series data must meet the following requirements:
The data set contains one variable for each dependent variable.
The data set contains a time ID variable that identifies the time period for each observation. When SAS Forecast Studio creates a project, the data is sorted by the time ID variable so that the observations are in order according to time.
Thanks,
Udo
Look at Using Observation Numbers as the Time ID .
Hello -
Please note that @PGStats's suggestion will only work if you use the SAS Forecast Server procedures.
From documentation:
Requirements for Time Series Data
To generate forecasts in SAS Forecast Studio, you need time series data. You might already have this time series data, or you might have transactional data. If you have transactional data, you can use the accumulation options in SAS Forecast Studio to convert the transactional data into a time series.
Your time series data must meet the following requirements:
The data set contains one variable for each dependent variable.
The data set contains a time ID variable that identifies the time period for each observation. When SAS Forecast Studio creates a project, the data is sorted by the time ID variable so that the observations are in order according to time.
Thanks,
Udo
Please take a look at the following thread for a solution. alex
The reason why you see strange dates in the plot x-axis is that the observation numbers you are using for ID variables are intepreted as SAS dates and reformatted according to the interval specified. SAS dates are number of days since a cutoff data, which by default is 1960. If you run the following examples you will see what I mean. The "dateid" variable is formatted as date9., which is the default for DAY interval, so it prints as 02JAN1960 and so on.
data air;
set sashelp.air;
id = _n_;
dateid = id;
newdateid = id-"01Jan1960"d - 1;
format dateid date9. newdateid day9.;
run;
proc print data=air(obs=32); run;
SAS dates and formats are explained in more details here:
I don't have access to FS as I am writing but I don't think you can remove the format that is assigned automatically according to the INTERVAL specified. Someone else may correct me if I am wrong.
As you see in the example above, I created a new variable "newdateid" that I recentered around 01Jan1960 and formatted as day9. If you use newdateid as your ID variable it will show the day of the month only on the x-axis, which is closer to what you want. However that's not a perfect solution since it will start again from 1 when February starts, and so on for every month.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.