I have a series x and, say, 4 sample periods. I want to create a series y that is the linear interpolation of the beginning and end-points of the samples.
Code: Select all
sample s1 1980 1990
sample s2 1990 1998
sample s3 1998 2002
sample s4 2002 2009
for !ss=1 to 4
smpl s{!ss}
series temp=@recode([if index=1 or last],x,na)
y.ipolate temp
delete temp
next !ss
Could you please help?
Thanks,
Javier
