|
Hello everyone,
I want to create a new subfile from my large spss datafile. The new subfile should contain the cases that have no missing values in all variables. Do you know the syntax? Johnny ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ===================== 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 |
|
Hi Johnny.
I hope you using a SPSS version with Python. Here is a simple solution. ********************************* BEGIN PROGRAM. import spss import re nVars = spss.GetVariableCount() spss.Submit("Compute TEMP=0.") TT = "" for i in range(spss.GetVariableCount()): if spss.GetVariableName(i).count(TT) > 0: if spss.GetVariableFormat(i) == "F1": spss.Submit("if ~sysmis(" +spss.GetVariableName(i) +") TEMP = TEMP + 1.") END PROGRAM. Execute. freq TEMP. ********************************* Use TEMP to select the cases. If you want you can type in a restriction in TT. All the best Wilhelm Svensson | +46-735-460000 | [hidden email] Queue Sweden AB - A Management Science Company | www.qsweden.com -----Ursprungligt meddelande----- Från: SPSSX(r) Discussion [mailto:[hidden email]] För John Amora Skickat: den 9 mars 2008 13:25 Till: [hidden email] Ämne: deleting cases with missing values Hello everyone, I want to create a new subfile from my large spss datafile. The new subfile should contain the cases that have no missing values in all variables. Do you know the syntax? Johnny ____________________________________________________________________________ ________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ===================== 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 |
|
In reply to this post by Johnny Amora
At 08:25 AM 3/9/2008, John Amora wrote:
>I want to create a new subfile from my large spss datafile. The new >subfile should contain the cases that have no missing values in all variables. Well, if ALPHA and OMEGA are the first and last variables in your file, there's always (not tested), GET FILE AllCases. SELECT IF NMISS (ALPHA TO OMEGA) EQ 0. SAVE OUTFILE=FullCases. ===================== 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 |
