I'm trying to plot two sets of calculations and compare them over time. The "cohort" variable, derived from coh_asof_yyyymm from original table, were stored in the data set in numeric format (201003 for 2010 March). Now when I plot them by using proc sgplot, 4 quarters of data are crammed together. How do I change the format of this variable in order to product outputs where x-axis should be in interval of quarters?
options nofmterr;
libname backtest "/retail/mortgage/consumer/new";
proc sql;
create table frst_cur as
select
coh_asof_yyyymm as cohort,
sum(annual_default_occurrence* wt)/sum(wt) as dr_ct,
sum(ScorePIT_PD_2013 * wt)/sum(wt) as pd_ct_pit,
sum(ScoreTTC_PD_2013 * wt)/sum(wt) as pd_ct_ttc
from backtest.sample_frst_cur_201312bkts
group by 1;
quit;
proc sgplot data = frst_cur;
series x = cohort y = pd_ct_pit;
series x = cohort y = pd_ct_ttc;
format cohort yyyyqc.;
xaxis label = 'Cohort Date';
yaxis label = 'Defaults';
title 'First Mortgage Current';
run;