title: VARSTOCASES (in SPSS) function with unequal spacing of waves
body: <p>My problem with the VARSTOCASES is that I'm unable to deal with unequal spacing of waves in longitudinal data (I'm using the NLSY79). My dependent variable (log of wage) is not available for all years. But with R, I can easily deal with that using a syntax like this :</p>
  
  <p>ld = reshape(d, varying = c("logwage1989", "logwage1990", "logwage1991", "logwage1992", "logwage1993", "logwage1994", "logwage1996", "logwage1998", "logwage2000", "logwage2002", "logwage2004", "logwage2006", "logwage2008", "logwage2010"), v.names = "logwage", timevar = "year", times = c("1989", "1990", "1991", "1992", "1993", "1994", "1996", "1998", "2000", "2002", "2004", "2006", "2008", "2010"), direction = "long")</p>
  
  <p>And in SPSS, what I do is something like this :</p>
  
  <p>VARSTOCASES
     /make logwage from logwage1989 logwage1990 logwage1991 logwage1992 logwage1993    logwage1994 logwage1996 logwage1998 logwage2000 logwage2002 logwage2004 logwage2006 logwage2008 logwage2010
     /index= year(14)
     /keep=grade AFQT educmom educdad occupationmom occupationdad familyincome.</p>
  
  <p>In the above, 14 is the total number of waves. And what SPSS outputs is a series of numbers going from 1 to 14. The data is collected once every year first, and then it's collected once every two years. For SPSS, the values 1 and 2 in the year variable correspond to 1989 and 1990 while values 13 and 14 correspond to 2008 and 2010, respectively. And that's the problem.</p>
  
  <p>How would you write the reshape function in SPSS as I did in R ?</p>