Hello,
Excuse my title if it does a poor job describing my problem.
My data currently looks like this (although with 59400 obs and 66 variables) and the panel variable is mquint.
I need help in making a code which allows me to add additional observations equal to how many observations each value of mquint has. These new observations will be the return of mquint = 1 minus return of mquint = 5.
I tried doing this by reshape wide, but I was not able to make any code that was efficient or I was sure was working.
Thanks in advance, and excuse my poor english (second language)
Excuse my title if it does a poor job describing my problem.
My data currently looks like this (although with 59400 obs and 66 variables) and the panel variable is mquint.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(mquint monthly return) 1 270 0 1 270 -.0154 2 270 0 2 270 .016 3 270 -.0333 3 270 -.0043 4 270 .0242 4 270 -.0194 5 270 -.0051 5 270 -.0184 end format %tm monthly
I tried doing this by reshape wide, but I was not able to make any code that was efficient or I was sure was working.
Thanks in advance, and excuse my poor english (second language)
Comment