Write a program on stata that will construct a moving


Write a program on STATA that will construct a moving average on a given variable, given a ‘window' and store it as another variable. For example, if we have a dataset with 10 observations a variable x, and the window is of size 3, then your program will create a new variable, where y1 =x1+x2+x33, y2 =x2+x3+x43, etc. Of course, this will result in some missing values in the end.

Solution Preview :

Prepared by a verified Expert
Business Economics: Write a program on stata that will construct a moving
Reference No:- TGS02252719

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)