All, I believe I’ve seen this discussed before and I apologize in advance for the redundancy of my question. I have a dataset with 55 vars and 869 cases. There are many missing values across many of the variables. What I would like to do is select only cases that have complete data on all of the variables. Any suggestions most appreciated. Tony A J Baglioni jr McIntire School of Commerce University of Virginia Rouss & Robertson Halls, East Lawn P.O. Box 400173 Charlottesville, Va 22904-4173 434.924.4961 |
Administrator
|
If all variables are numeric, you can use the NMISS function.
SELECT IF NMISS(v1 to v55) EQ 0. EXECUTE. Replace v1 and v55 with the appropriate variable names in your file. If your file includes string variables, things will be a little more complicated, because IIRC, NMISS only works with numeric variables.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
In reply to this post by Baglioni, Tony
There are different ways to do this. Here is one:
* use with all numeric variables starting with var1 to varN. compute casemiss=nmiss(var1 to varN). temp. select if (cassmiss eq 0). freq var=casemiss. The above temporarily selects those cases with complete cases (i.e., casemiss = 0). You might want to examine the values of casemiss for a more thorough analysis. -Mike Palij New York University [hidden email] On Wed, Feb 29, 2012 at 7:58 AM, Baglioni, Tony <[hidden email]> wrote: > All, > > > > I believe I’ve seen this discussed before and I apologize in advance for the > redundancy of my question. I have a dataset with 55 vars and 869 cases. > There are many missing values across many of the variables. What I would > like to do is select only cases that have complete data on all of the > variables. Any suggestions most appreciated. > > > > Tony > > > > A J Baglioni jr > > McIntire School of Commerce > > University of Virginia > > Rouss & Robertson Halls, East Lawn > > P.O. Box 400173 > > Charlottesville, Va 22904-4173 > > 434.924.4961 > > ===================== 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 Bruce Weaver
Bruce,
Thanks; that worked perfectly. Tony A J Baglioni jr McIntire School of Commerce University of Virginia Rouss & Robertson Halls, East Lawn P.O. Box 400173 Charlottesville, Va 22904-4173 434.924.4961 -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: Wednesday, February 29, 2012 8:53 AM To: [hidden email] Subject: Re: Select on missing value If all variables are numeric, you can use the NMISS function. SELECT IF NMISS(v1 to v55) EQ 0. EXECUTE. Replace v1 and v55 with the appropriate variable names in your file. If your file includes string variables, things will be a little more complicated, because IIRC, NMISS only works with numeric variables. Baglioni, Tony wrote > > All, > > I believe I've seen this discussed before and I apologize in advance > for the redundancy of my question. I have a dataset with 55 vars and > 869 cases. There are many missing values across many of the > variables. What I would like to do is select only cases that have > complete data on all of the variables. Any suggestions most appreciated. > > Tony > > A J Baglioni jr > McIntire School of Commerce > University of Virginia > Rouss & Robertson Halls, East Lawn > P.O. Box 400173 > Charlottesville, Va 22904-4173 > 434.924.4961 > ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Select-on-missing-value-tp5524906p5524981.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 |