Dear forum users,
I am working on a panel dataset where country is the cross-sectional unit and year the time dimension. Let me call the variable of interest X. My goal is to calculate country specific means of different window sizes. For instance, for the year 2000 in the Netherlands, I would like to calculate the Netherlands specific mean of X during the years 1996 - 2000 for a 5 year window, or the mean of the years 1991 - 2000 for a 10 year window, etc. There are no missing values. Can someone help me with this?
Thank you very much in advance!
ps: I tried to simplify the context but please let me know if more information is needed.
I am working on a panel dataset where country is the cross-sectional unit and year the time dimension. Let me call the variable of interest X. My goal is to calculate country specific means of different window sizes. For instance, for the year 2000 in the Netherlands, I would like to calculate the Netherlands specific mean of X during the years 1996 - 2000 for a 5 year window, or the mean of the years 1991 - 2000 for a 10 year window, etc. There are no missing values. Can someone help me with this?
Thank you very much in advance!
ps: I tried to simplify the context but please let me know if more information is needed.
Comment