|
I'd love help with this one..
I have used the CASES TO VARIABLES syntax to combine hundreds of cases succesfully. However, I now have duplicate values of certain variables (example v1, v2, v3, v4, v5 all equal "3"; v7, v8, v10 all equal "10") How can I get rid of the redundant variables/values? ===================== 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 |
|
Allison,
Why not use the delete variables command? Or, so that you leave no record of what you did, go into the data view of the data window, select the columns and just delete them. Gene Maguin ===================== 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 A W Willis
First you identify duplicates by going to the data menu and 'identify duplicate cases'.
Then if you need to move some data from a participant that is duplicated but has some data in one line and some on another do this. This uses the PrimaryLast variable created by 'identify duplicate cases'. SPSS codes the first repeat: do if lag(PrimaryLast)=0. + do repeat zzz = Var1 to VarX. + if missing (zzz) zzz=lag(zzz). + end repeat. end if. exe. Var1 to VarX is just the range of variables that you want to do this for. Usually just all variables other than your unique identifier. It doesn't matter that it will do it for all variables. It will just copy the complete data over the same complete data on the other line, but also copy complete data to the line where it is missing. Matthew Pirritano, Ph.D. Email: [hidden email] ----- Original Message ---- From: Allison Wright Willis <[hidden email]> To: [hidden email] Sent: Saturday, May 10, 2008 11:26:03 AM Subject: Delete duplicate values I'd love help with this one.. I have used the CASES TO VARIABLES syntax to combine hundreds of cases succesfully. However, I now have duplicate values of certain variables (example v1, v2, v3, v4, v5 all equal "3"; v7, v8, v10 all equal "10") How can I get rid of the redundant variables/values? ===================== 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 ====================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 |
| Free forum by Nabble | Edit this page |
