I am trying to reshape a dataset from wide to long and can't figure one
small thing out. My variables are all named with the j identifier at the
beginning of the variable, rather than at the end, e.g.,
a03income
b03income
c03income
d03income
e03income
a12ed
b12ed
c12ed
d12ed
e12ed
etc.
where a,b,c,d,e stands for wave. I want to:
reshape long [many variables], i(id) j(wave) string
but, of course, Stata seems to be looking to the end of my variables for
the wave identifier when mine are at the beginning. I have been trying to
use my limited programming skills to move the letter from the beginning to
the end on all of the variables, but haven't been able to do it.
Any suggestions?
Thanks!
Sarah
Sarah A. Mustillo, Ph.D
Center for Developmental Epidemiology
Department of Psychiatry and Behavioral Sciences
Duke University School of Medicine
Box 3454
Durham NC 27710