Hello,
I'm trying to use PROC X12 to measure the effect of different calendar months on used vehicle prices. Basically, I just want a coefficient that I can apply to a baseline price forecast (which is generated by OLS regression), that will adjust the baseline forecast up or down depending on what month it is. For instance - "All things equal, used vehicle prices are 20% higher in March, so therefore if X(March) = 1, then B(March) = 1.2 and the baseline forecast would be increased by 20%".
Can this be done with Proc X12? I know as an alternative I could create dummy variables for each calendar month and add those to the OLS regression to capture the same effect, but I'm wanting to try a different approach. There are no time-series elements in my data (all observations are unique and uncorrelated - they are vehicles that were sold at auction), so I don't need any of the ARIMA functionality within X12.
Thanks,
I'm not exactly sure what you are looking for, but let me provide some info and see if this helps.
X13 (X12) has predefined regressors and also events can be used. You can use an ARIMA (0 0 0)(0 0 0) model. Parameters for regressors can be estimated. The event dummies can be output. You will need at least 3 years of data, but I know that sometimes people achieve this by repeating the same year 3 times.
Try the following code that uses several strategies including trading day regression, X13 predefined dummies and monthly dummies. (Note that the last term is usually derived to avoid singularity.) There are more options than I show, for instance trigonometric seasonal dummies and other trading day effects.
Also look for "Regression Model Parameter Estimates" in the lst file. The parameter estimates can be output to a data set using "ods output RegParameterEstimates=<dataset name>".
proc x13 data=sashelp.air date=date;
regression predefined=TD;
estimate;
output out=TDreg A1 A6 B1;
run;
proc print data=TDreg;
run;
proc x13 data=sashelp.air date=date;
regression predefined=seasonal;
estimate;
output out=Seasonalreg A1 B1;
run;
proc print data=Seasonalreg;
run;
proc x13 data=sashelp.air date=date;
event January February March April May June July August
September October November /
usertype=seasonal seasonal seasonal seasonal seasonal
seasonal seasonal seasonal seasonal seasonal
seasonal;
estimate;
output out=Monthsreg A1 A10 B1;
run;
proc print data=Monthsreg;
run;
/* 35 observations is not enough data */
proc x13 data=sashelp.air(obs=35) date=date;
regression predefined=seasonal;
estimate;
output out=Seasonalreg A1 B1;
run;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.