Hi,
My data is as following:
I would like Stata to take the last TermSpread with missing values of DTS_arma31_fcst and from there add up DTS_arma31_fcst. So in this case, take the TermSpread of 1.12 and sum up -.001226591, then take the outcome and sum up the next DTS_arma31_fcst, and so on.
How can I do this?
Thanks
My data is as following:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double TermSpread float(time Year DTS_arma31_fcst) 1.13 748 2007 . 1.1 749 2007 . 1.15 750 2007 . 1.12 751 2007 . 1.18 752 2007 -.001226591 .9 753 2007 -.001226591 .98 754 2007 -.006479398 1.04 755 2007 .02269019 .93 756 2007 -.008195256 .68 757 2007 -.006479398 .65 758 2008 .008105395 .67 759 2008 .0201164 .68 760 2008 .0012419632 .59 761 2008 -.003047682 .61 762 2008 -.0021897529 .6 763 2008 .006389538 .67 764 2008 -.003047682 .73 765 2008 -.0004738948 .62 766 2008 -.007337327 .55 767 2008 -.006479398 .6 768 2008 .008105395 .59 769 2008 .00467368 .8 770 2008 -.005621469 1.17 771 2008 -.0004738948 1.3 772 2008 -.01934833 1.31 773 2008 -.0330752 1.31 774 2008 -.012484902 1.27 775 2008 -.0021897529 1.41 776 2008 -.001331824 1.57 777 2008 .0020998924 1.71 778 2008 -.01334283 end
How can I do this?
Thanks

Comment