I would much appreciate your assistance with the below question.
Please, I have data set that contains information on assets and their holding periods. The data contains 4 variables: 1- Asset number (asset_no), 2- starting period of ownership (acquisition_quarter) in format year quarter; ex. 2006q1), 3- Ending period of ownership (sold_quarter) in format year quarter; ex. 2006q4, and 4- the number of quarters between start and end of ownership (ownership_quarter) in numbers ex. 3 means three-quarters of ownership.
Note that the asset_no uniquely identify each observation
here is an example of the data
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long asset_no float(acquisition_quarter sold_quarter ownership_quarter) 242764 215 216 1 39555 155 167 12 90357 185 199 14 273042 219 233 14 200185 209 223 14 122935 183 199 16 291848 223 240 17 11072 134 165 31 75284 177 208 31 13124 135 167 32 211298 211 243 32 52943 159 195 36 27595 149 186 37 66343 151 191 40 22736 147 189 42 213965 182 233 51 27479 135 188 53 5713 137 202 65 15682 79 188 109 343082 91 233 142 end format %tq acquisition_quarter format %tq sold_quarter
I hope my question is clear and Thank you a lot in advance.
Regards,
Islam Ibrahim
0 Response to Generating time series of (quarter) date variables for the period between two date variables: beginning and end of ownership
Post a Comment