SPSS Statistics

 View Only
  • 1.  Long to wide format with missing waves

    Posted Mon June 27, 2022 10:13 AM
    The data set I am working with has the long format - data from up to four data collection waves are arranged in up to four separate rows for the same client. I will eventually be doing repeated measures analyses on the data, so want to create a data set with wide format. I am familiar with the basics of the Restructure Data wizard. However, the original data set has many missing observations, either because a client missed their data collection interview or they are not yet due for it. So for instance, client 1 might have data from time 1, time 3, and time 4..... client 2 might have data from time 1 and time 4.... and client 3 might have data from time 1, 2, 3, and 4 (you get the picture). The Restructure Data wizard will not produce a correct file when there are missing data collection waves.

    To try to get around it so the Restructure Data wizard will work.... in Excel (the data file is originally downloaded into Excel), I inserted empty rows for each missing wave for each client (with just the client's ID and "time" - an index variables that represents the number of the data collection wave). The Restructure Data wizard then worked like it was supposed to.

    However.... at the moment, the data set is small, but it will grow over time, and going through and inserting empty rows in Excel for each missing wave per client is time consuming. Missing data is a complete nuisance but not at all unusual, so there must be ways to deal with this that are more efficient, especially given the large size of many data sets. Thank you to any and all who can help with my quandary!

    I am looking for input on how to more efficiently create a data set (that has missing observations) that SPSS's Restructure Data wizard will be able to turn into a correctly arranged wide format.

    ------------------------------
    Janet
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Long to wide format with missing waves

    IBM Champion
    Posted Mon June 27, 2022 12:52 PM
    I am not sure what you would define as correct here.  If you can send me a sample of the data and the CASESTOVARS syntax you are using, I can take a look. (jkpeck@gmail.com)