Hello,
I have daily panel data over several years and for several stocks. For each day and for each stock I have the number of stockholders. I have sorted the data by stock.
I now need to calculate a new variable for each row the median stockholders over the previous 30 days. How can I implement this in Stata?
I do not know how to ensure that the median stockholders for each row is computed by the stockholders of the previous 30 days and how to ensure that when it comes to the next stock Stata does not include for this stock some of the previous observations referring to the previous stock.
Would really appreciate your help! Thank you!
Best regards,
Eva
Related Posts with Row Median
Stata 17 Features Leaked Default precision changed to double regress now supports multiway clustering of standard errors Dof…
Matching data over three waves of income surveysDear all, I am conducting an analysis where I want to see the effects of weather on income in Bangl…
Multicollinearity with lagged dependent variableHello, I have a question about testing for multicollinearity. I have panel data for 11 industries o…
st_matrix for a rowHello everybody, I am a complete beginner to Mata.. I want to take the means from each column of ma…
Error message when obtaining SVAR's IRFDear all, I am trying to obtain simple Impulse Response Functions after running a SVAR. Code: ma…
Subscribe to:
Post Comments (Atom)
0 Response to Row Median
Post a Comment