I am not sure how to calculate weighted average means in a rolling fashion.
I can only calculate equally weighted means in a rolling fashion (for 12 weeks within the quarter) using -asrol- as follows:
Code:
bys quarter_date : asrol var1, window(weeks 12) stat(mean)
Code:
rangestat (mean) var1, interval(week . 0) by(quarter_date ) casewise
Can anyone help with this, please?
Thanks
0 Response to Weighted average means in a rolling fashion
Post a Comment