Hello,
I have a dataset of 1,791 firm-year observations. Now, I would like - for each firm-year observation - to incorporate the earnings number of the previous 5 years.
So, for example, I have this:
Company | fyear | earnings (on t=fyear)
x | 2018 | ...
x | 2017 | ...
y | 2018 | ...
y | 2017 | ...
y | 2016 | ...
y | 2015 | ...
z | 2016 | ...
z | 2015 | ...
z | 2014 | ...
What I want to get is this:
Company | fyear | earnings (on t=fyear) | earnings t=-1 | earnings t=-2 | earnings t=-3 | earnings t=-4 | earnings t=-5
__________________________________________________ __________________________________________
My questions is thus:
How can I merge COMPUSTAT's earnings output with my firm-year observations?
If you need more information, please feel free to ask!
Kind regards,
Pepijn
Related Posts with Create laggings
Problem with nlsur commandDear Stata users, I am currently running the nlsur command to estimate a system of 2 equations usin…
Scoring measures using STATAI have dataset that includes items measuring diagnostic criteria for personality disorders. For each…
How significance of stata pwcorr is calculated?When i run pwcorr, with the option sig, how stata test de significance of the correlation coeficient…
Importing previously imputed data using mi importHello Stata Users, I have been trying to import previously imputed data (m=0, 1,2,…..20) using mi im…
Propensity score weighting on samplesI want to weight my sample with propensity scores first, then run OLS with weighted sample. I know …
Subscribe to:
Post Comments (Atom)
0 Response to Create laggings
Post a Comment