06-23-2015 07:54 PM
I have age-specific rates that are in 5-year age intervals that I want to interpolate to rates for single-years of age. In the past I've done this in excel. Is proc expand the correct procedure? I only see info on changing things from monthly to daily, etc and not from 5-year to 1-year rates.
Thanks in advance for any guidance.
08-13-2015 02:06 PM
Thank you, Xia, for your help.
In case anyone is wondering what I ended up doing, here is what I did. The results are very close to the data that I was getting when I did the interpolation in excel.
/*I created an empty dataset with all the ages by 1 so that I would have the correct ages to fill in with the interpolated data:*/
do age=15 to 44 by 1;
/*Then I merged that dummy data set onto my data set that had my 5-year fertility rates:*/
merge padded work.fert_rates_2012;
/*Then this is the expand options that I used. The convert has the two fertility rate variables--one for hispanic one for non-hispanic and used the age variable as the ID.*/
proc expand data=pad out=expanded method = spline(natural)
convert hisp_irate nonhisp_irate;