Hi all,
I have data in the following format:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(mci cl_id) float(yearmo_call servicemonth1) 1000 992094 720 636 1000 1179866 708 707 1000 1036729 708 645 1000 854614 696 636 1000 854614 696 636 1000 864615 624 681 1000 908069 708 636 1000 871369 672 636 1000 1125496 684 636 1000 881157 600 636 1000 833150 672 636 1000 820983 588 636 1000 963879 624 636 end format %tm yearmo_call format %tm servicemonth1
I would like something similar to this:
MCI YearMonthVariable CallOccurred ServiceOccurred
1 2014m1 0 0
1 2014m2 1 0
1 2014m3 0 0
And so on and so forth for every ID and every yearmonth. Any ideas?
--Collin
0 Response to Wide to Long Reshaping
Post a Comment