Generate series with constant values
Posted: Tue Jul 14, 2015 8:31 am
Hi,
I hope someone can help me figure out how to program the following.
I have over 70 series from 1980-2013. I need each series spliced such that observations from 2014-2020 are constant and take the value observed in 2013. The series are named something like cfc110, cfc135, cfc529, etc. Is there a way to loop this so that I don't have to list all the unique characters for each series? I know I could do something like
smpl 2014 2020
for %x 110 135 529
genr cfc{%x} = cfc{%x}(-1)
next
But since I have more than 70 series with more complicated unique characters, is there a different, better way to do this?
Thanks so much for help!
I hope someone can help me figure out how to program the following.
I have over 70 series from 1980-2013. I need each series spliced such that observations from 2014-2020 are constant and take the value observed in 2013. The series are named something like cfc110, cfc135, cfc529, etc. Is there a way to loop this so that I don't have to list all the unique characters for each series? I know I could do something like
smpl 2014 2020
for %x 110 135 529
genr cfc{%x} = cfc{%x}(-1)
next
But since I have more than 70 series with more complicated unique characters, is there a different, better way to do this?
Thanks so much for help!