Hello I would grateful to learn from anyone who can suggest some SPSS syntax to address the following problem. Suppose I have 50 columns - one
for each of variables v1, v2, ...., v50 - pertaining to velocity taken at 50
separate time points and that I also have a participant identifier column
'idcode' containing numerical codes for the participants to which these
velocities apply. As such, the 50 columns pertain to repeated measures across
the same participants. I now wish to stack the velocity columns into a single
column while retaining the current orders of the velocity readings within the
50 individual columns. In other words, there should be a simple stacking of
columns in the order v1-v50 with no re-ordering of the contents of the
individual columns v1-v50. I do not wish to create 50 separate datafiles to
accomplish a merge. However, I would like to work within the existing datafile
to merge the columns. Doing this manually would not make a great deal of sense,
as there are many participants in the study, rendering the copy-paste procedure
open to errors. I do not wish to assume that the 50 columns sit side-by-side;
rather, there may be columns for other data separating them. Thanks in advance. Best wishes Margaret |
The command
VARSTOCASES /MAKE V FROM V1 TO V50 /INDEX Order. sounds to me like it will do what you want. |
In reply to this post by Margaret MacDougall
VARSTOCASES Ryan Sent from my iPhone ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
In reply to this post by Andy W
Not quite, Andy (according to the exact wording of my original query). However, with further practise and reading I have noted how to uses the command VARSTOCASES as a starting point and subsequently arranged the data as wanted fairly efficiently. Therefore thanks for suggesting this command. Best wishes Margaret
|
Administrator
|
In what manner does Andy's suggestion deviate from "the exact wording of" your "original query"?
---
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 |