Dear Members,
I am quiet new to Stata and need your help regarding a problem:
I have panel data and for every time period I want to create a new variable, which is the average of a rank of the observations in t-4/-8/-12/-16/-20 on an existing variable for the time periods t-4 to t-23.
I think I am able to compute the average of the ranks in t-4/-8/-12/-16/-20 with the L. function, but I struggle creating the rank itself, because each observation has various ranks since it appears in several time periods of t-4 to t-23.
I hope you get my problem.
Thanks in advance for all answers.
Best regards,
Tom Engel
I am quiet new to Stata and need your help regarding a problem:
I have panel data and for every time period I want to create a new variable, which is the average of a rank of the observations in t-4/-8/-12/-16/-20 on an existing variable for the time periods t-4 to t-23.
I think I am able to compute the average of the ranks in t-4/-8/-12/-16/-20 with the L. function, but I struggle creating the rank itself, because each observation has various ranks since it appears in several time periods of t-4 to t-23.
I hope you get my problem.
Thanks in advance for all answers.
Best regards,
Tom Engel
Comment