09-30-2013 12:35 PM
I am working on ways to visualize series. Using the SASHELP.STOCKS data set, I am trying to panel by year. However, in the code below, the SERIES statement is linking December with the following January. I can't figure out how to fix this.
First, I create a new data set that has "month" separated for each year and decade created as well
year = year(date);
month = mod(intck('MONTH', '01JAN1986'd, date), 12);
decade = floor(year/10);
Next, I run the plot
proc sgpanel data = stocks;
where stock = "IBM";
series x = month y = close;
Resulting in the attached plot
Need further help from the community? Please ask a new question.