I am trying to create a series where each variable is generated as a sum of the next k period observations (e.g. k=120). So I am looking for a way to make this command easier:
Code: Select all
Series y=x+x(+1)+x(+2)+...+x(+k)/Junim
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Code: Select all
Series y=x+x(+1)+x(+2)+...+x(+k)Maybe to get the lead,If k is fixed, you just want a moving sum. You can use the @movsum function for that.
Code: Select all
series ytemp=@movsum(x,k)
series y = ytemp(k)Users browsing this forum: No registered users and 1 guest