I wanted to make a correction to my earlier reply. To use PROC EXPAND with the EXTRAPOLATE option, you would not need to provide missing values for the entire range of data you want to extrapolate, but you would need to include an observation at the beginning (or end) of your DATA= data set to indicate the endpoint for the extrapolation range.
Following, please find a modified example, which augments your DATA data set with one new observation at the beginning of the data. The YM_YLD variable is set to missing for that first observation:
data data;
format date date9.;
input rttm_int ym_yld;
date=intnx('year','01jun2017'd,rttm_int-1);
datalines;
1 .
4 1.49
5 1.72
6 1.84
11 3.39
;
proc print data=data;
run;
proc expand data=data to=year out=data2 extrapolate;
id date;
convert ym_yld=interpol_yld / method=spline(natural);
run;
proc print data=data2;
format date date9.;
run;
As you correctly noted in your initial post on this topic and as mentioned in the PROC EXPAND documentation, the EXTRAPOLATE option is not generally advised and should be used with caution, since the extrapolated values might not be very reasonable. Other approaches, such as the one mentioned by Ksharp, should certainly be explored.
Hope this helps,
DW
... View more