SPSS Statistics

 View Only
  • 1.  Transferring data from one case to another on same variable

    Posted Mon February 13, 2023 10:02 AM
    Hello! I
     am working on a big longitudinal dataset for my PhD project. I need to transfer some data from some students to other students within the same variable. I want to use syntax.
    So the idea is that I have students nested in teachers. The students filled out their age at W1 and then the teacher who was participating with them dropped out. The new teacher took over, so students received a new ID. But we did not ask them their age again at W2 when they participated with the new teacher. I now want to copy the age they give at W1 under their first ID to their new case at the second W2. My data is in a longformat, so waves nested in students. So the transfer happens at the same variable. -99 is used for missing
    My Data for example looks like this: CLASSID STUDID WAVE AGE
    1111 111111 1 8
    1111 111111 2 -99
    1112 111211 2 -99
     
    So student 111111 and 111112 are the same student and I want the age of 111111 on wave 1 to transfer to the age of 111211 on wave 2.
     
    I hope someone can help! I am using SPSS28.0.1.0


    ------------------------------
    Lian van Vemde
    ------------------------------


  • 2.  RE: Transferring data from one case to another on same variable

    Posted Mon February 13, 2023 10:10 AM
    Did you try the MATCH FILES approach I suggested on the Reddit site where you posted the same question?

    --