Hi all
I have a flat file that looks like this. ID Q1_T1 Q1_T2 Q1_T3 Q1_T4 1 5 6 2 3 4 5 3 4 4 4 4 2 1 3 6 Q1 was asked multiple times over time and some answered it more than others. The goal is to compute the difference between the first time and last time they answered the question. So I want to tell SPSS: look at Q1_T1 through Q1_T4 compute Q1_First = Q1_T1 compute Q1_Last = "the last T that has a value" so that the file looks like this. ID Q1_First Q1_Last 1 5 6 2 3 5 3 4 4 4 2 6 Suggestions for syntax? Thanks much. Carol |
Administrator
|
http://spssx-discussion.1045642.n5.nabble.com/creating-last-available-score-from-multiple-measurement-occasions-td5728633.html
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by parisec
Thank you! I'll check this out. From: Jignesh Sutar [mailto:[hidden email]] A very similar question with a solution was posted just this week:
Hi all |
In reply to this post by parisec
This will calculate you the value of the last time period answered under single column:
VECTOR x=Q1_T1 to Q1_T4. LOOP Last_Position=4 TO 1 BY -1 . END LOOP IF NOT MISSING(x(Last_Position)). COMPUTE Last_Score=x(Last_Position). On Friday, 13 February 2015, Jignesh Sutar <[hidden email]> wrote: A very similar question with a solution was posted just this week: |
Administrator
|
Wow Jignesh, that looks like a very interesting solution ;-)
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |