Code:
list x_totasset1 sd_totasset1 agegrp wave i in 1/10 +------------------------------------------+ | x_tota~1 sd_to~t1 agegrp wave i | |------------------------------------------| 1. | 33198 23337.35 20 2 1 | 2. | 37311 65327.32 20 6 2 | 3. | 120297.4 199242.6 20 10 3 | 4. | 174395.2 279109.5 20 14 4 | 5. | 439030.5 726204.7 20 18 5 | |------------------------------------------| 6. | 124624.2 180614.7 25 2 6 | 7. | 149154.2 159179.2 25 6 7 | 8. | 226977.2 271007.8 25 10 8 | 9. | 329907.3 928040.2 25 14 9 | 10. | 211385.7 440034 25 18 10 | +------------------------------------------+
Code:
reshape wide x_* sd_* n_* ub_* lb_*, i(i) j(intra)
(related) I did read the example in this Stata FAQ, where Nick Cox shows that when moving from wide to long that id (nor id and pos combined), uniquely identified the observations, so created a new ID and created a new identifier once in long format by using egen to group(id pos) but this didn't help me understand the above example.
Stata v.15.1. Using panel data.
0 Response to Function of the variable(s) in i() of a -reshape- especially when grouped
Post a Comment