Hey,
I keep it basic. I have 10 000 rows of numeric values with a variable name temperature.. I would like Stata to take the average of 20 entries and store that.
So for example the first loop goes, through the first 20 rows, takes the average and then stores it. Next loop it goes through rows 20-40, takes the average of those and returns it. Repeat this for (10 000/20) = 500 times. End result is a variable name called new_temperature which has averages.
I feel that this problem is easy enough so that I dont need to provide an example data-set.
Thank you!
I keep it basic. I have 10 000 rows of numeric values with a variable name temperature.. I would like Stata to take the average of 20 entries and store that.
So for example the first loop goes, through the first 20 rows, takes the average and then stores it. Next loop it goes through rows 20-40, takes the average of those and returns it. Repeat this for (10 000/20) = 500 times. End result is a variable name called new_temperature which has averages.
I feel that this problem is easy enough so that I dont need to provide an example data-set.
Thank you!

Comment