04-18-2016 10:27 PM
I'm trying to use proc x12 to adjust seasonality. I use the following code. My data is quarterly.
proc x12 data=HAVE date=yyqq interval=4 noprint;
x11 mode=add outforecast;
There is error showing "Time ID variable DATADATE contains gaps." This is because some of my observations ended the third quarter of the year instead of the fourth quarter of the year. Is there any way to fix this??
Also, those firms with adjusted assets results have the exact same values of adjusted assets with unadjusted assets. Is this because none of the firm in my data has seasonality pattern in terms of assets OR there is some mistake in my coding? Please help.
04-27-2016 04:41 PM
You can use PROC TIMESERIES to covert your data into a proper time series with no gaps in the dates.
For example, this will set to 0 the values of all numerical variables for the dates for which there are no observations. You can look at the SETMISS= option in the manual to see other options.
proc timeseries data=have out=mseries; by company_id; id yyqq interval=quarter accumulate=total setmiss=0 var _numeric_; run;