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
test equality of coefficients from two different regressions after aregDear all, I need to test the equality of coefficients from two different regressions after areg. Ho…
Aligning x-axes with graph combineHi Statalist, Using 'graph combine' I have combined four graphs. The graphs depict physiological da…
ivppml and ivpoissonDear Stata community, I have a panel gravity dataset. I have trying to run the following models 1…
Different CIs with specified survey design using svy: mean and svy: tab Dear Statalisters, my first Post is a question concerning different confidence intervals with speci…
Ttest order when assessing differenceHi, I have a question that I was hoping someone could help with regarding the order in which Stata …
Subscribe to:
Post Comments (Atom)
0 Response to Row Median
Post a Comment