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
Extract alphanumeric ids from textDear STATAlisters, I have a column of text, which also contains number(s). It has some peculiaritie…
How can I combine many data sets into one having a common variable in each one?Hi all, I 'm dealing with panel data (monthly based) , having 7 different data sets it's difficult …
deleting variables with the same valuesHello everyone, I would like to delete all variables of a dataset, in which all observations have t…
A really basic thing for <= and <, why returning the same result?Hi! I have a really basic question here, it's so strange, can someone help to identify where the pro…
graph bar: sorting in case of displaying several variablesI would like to illustrate the responses of a survey question that allowed for choosing multiple res…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding backwards
Post a Comment