Hello all, I want to create a variable which is defined as the annual decile rankings of the three-year average of total loss recognition timeliness. I want to have an average for each year starting from 2002 to 2018.
I tried to create the following command but it says invalid syntax:
egen AVR2002= rmean (Converse Converse [_n-1] Converse [_n-2]) if year==year[_n-1]+1
Would appreciate your help regarding that.
Related Posts with Three-year average of a variable
R squared - Negative binomialHello everyone! I am currently performing some negative binomial regressions (xtnreg) with my pan…
gologit2 suddenly having problems in Stata 15I have sent this problem to Stata tech support. I will be amazed if anyone on the list can help me b…
Linear panel data: imposing MA(6) correlation errorsHello Statalist! I'm doing an exercise from Microeconometrics Using Stata, by Cameron and Trivedi, E…
time variable mistakeHi, I have a balanced panel data set with data, for each cross-section, up until 2016 (i=10, t=147)…
Checking for Hetro in Longitudinal (Panel) DataGood Day, I am trying to check for hetro issue in my longitudinal data where the N is large and P is…
Subscribe to:
Post Comments (Atom)
0 Response to Three-year average of a variable
Post a Comment