Hello,
Im working on a dataset and want to expand my dataset backwards for 2 months extra. The dataex I added shows first the GVKEY (company ID), then the date and then the variabele (DLCQ).
For example: if the data is june 2009 I want to add May and April to the date variabele and take over the value of DLCQ in these months (25.353 in this case)
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input str6 gvkey long date double dlcq
"001004" 14669 25.353
"001004" 14761 26.314
"001004" 14853 48.151
"001004" 14944 50.437
"001004" 15034 49.665
"001004" 15126 13.652
"001004" 15218 65.396
"001004" 15309 71.162
"001004" 15399 20.89
Thank you!
Related Posts with Expanding backwards
egen for numeric variablesHi, I'm trying to concat two numeric variables whit the egen command, I know when it is used a strin…
DiDDear All, I have ran into several general issues whilst starting to work with DiD. The data that I …
Variable not recognized after modificationHi everyone, For company data analysis for my thesis, I wanted to create industry dummy variables b…
Problem of missing observations in CAPM estimationI have following variables from raw data and I want to estimate the return of Stock PG using CAPM mo…
How to calculate days and hours between two datesHi, I am calculating days and hours between two dates (admission date/time and discharge date/time)…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding backwards
Post a Comment