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
Granual calculations in an unbalanced panel data set are not consistent with the aggregatesI have a panel dataset with these variables variable name type format label variable label --------…
Survival analysis (hazard model): how to set up the 10-year data in a three-month windowDear Statalist, I have a set of data (from 2011-2020). I want to test when event X happened for use…
Error in postestimation testHi, I am doing a regression analysis with cross sectional data and matched pairs design. In order …
Bug found in nearmrg command (?)Hello everyone, After hours of debugging of my code, I think I found a bug in the command nearmrg t…
Temporal disaggregation with no indicator in Stata?!Hi all Is there any code available in Stata for time series disaggregation with no indicator variab…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding backwards
Post a Comment