Hi,
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
what I need is to create a time series of ownership periods, in other words converting the number of ownership quarters into quarter dates starting with the acquisition quarters then adding 1 (quarter) up till the number of quarters in the ownership_quarter variable. for example. if asset no. 1 has acquisition_quarter = 2006q1 and sold_quarter 2006q4 hence it has been owned for 4 quarters. then this observation would have ownership_1 = 2006q1 ownership_2 2006q2 ownership_3 2006q3 ownership_4 2006q4.
I hope my question is clear and Thank you a lot in advance.
Regards,
Islam Ibrahim
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
Comment