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
Coefplot: Displaying each level of a factor variable in one plotGreetings: I am trying to visualize the data for logistic regressions. My independent variable of i…
Matwrite installed but unrecognized commandHi, I'm having a hard time to get matwrite to work (SSC) and from here: https://ideas.repec.org/c/b…
Defining Program Stata HelpHi 2 Questions - 1) I was wondering if anyone had advice on how to learn to define programs in Sta…
foreach with if conditionHi, I would like to impose a condition in the foreach function on a variable which is not one of the…
Counting every pair combination on a datasetDear Statalist, Suppose you have the following dataset: City_1 City_2 Flow Pair_ID AAA BBB 456…
Subscribe to:
Post Comments (Atom)
0 Response to Three-year average of a variable
Post a Comment