How do I write the syntax to select all cases in which q4701 has a value
greater to or equal to 1 and q4702 through q4705 are all system missing? NOTE: I do not want to delete all other cases. TIA. |
Jim,
this should do the trick (untested): USE ALL. COMPUTE filter_$=(q4701>=1 and missing(q4702) and missing(q4703) and missing(q4704) and missing(q4705)). FILTER BY filter_$. EXECUTE . Now, I am not sure if the missing command here, can distinguish between user/system missing. any thoughts? HTH, Vivek -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Jim Moffitt Sent: Monday, August 28, 2006 11:12 AM To: [hidden email] Subject: System Missing Syntax How do I write the syntax to select all cases in which q4701 has a value greater to or equal to 1 and q4702 through q4705 are all system missing? NOTE: I do not want to delete all other cases. TIA. |
In reply to this post by Jim Moffitt
Try This :
*Syntax creates a filter to select required records . USE ALL. COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sysmis(q4705) ) FORMAT filter_sel (f1.0). FILTER BY filter_Sel. EXECUTE . -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Jim Moffitt Sent: Monday, August 28, 2006 11:12 AM To: [hidden email] Subject: System Missing Syntax How do I write the syntax to select all cases in which q4701 has a value greater to or equal to 1 and q4702 through q4705 are all system missing? NOTE: I do not want to delete all other cases. TIA. |
In reply to this post by Jim Moffitt
Edward:
Thanks for the help but when I pasted your syntax into a new window and ran it I got the following error messages. >USE ALL. >COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sy > smis(q4705) ) >FORMAT filter_sel (f1.0). >Error # 4381 in column 1. Text: FORMAT >The expression ends unexpectedly. >This command not executed. >FILTER BY filter_Sel. >Error # 4872 in column 11. Text: filter_Sel >The name of the filter variable is undefined. Either the variable has not >been defined or its name has been misspelled. >This command not executed. >EXECUTE . Any ideas? -----Original Message----- From: Edward Boadi [mailto:[hidden email]] Sent: Monday, August 28, 2006 10:24 AM To: Moffitt, James (West); [hidden email] Subject: RE: System Missing Syntax Try This : *Syntax creates a filter to select required records . USE ALL. COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sysmis(q4705) ) FORMAT filter_sel (f1.0). FILTER BY filter_Sel. EXECUTE . -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Jim Moffitt Sent: Monday, August 28, 2006 11:12 AM To: [hidden email] Subject: System Missing Syntax How do I write the syntax to select all cases in which q4701 has a value greater to or equal to 1 and q4702 through q4705 are all system missing? NOTE: I do not want to delete all other cases. TIA. |
In reply to this post by Jim Moffitt
Sorry, there should be a period after :
COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sysmis(q4705)). Thanks -----Original Message----- From: [hidden email] [mailto:[hidden email]] Sent: Monday, August 28, 2006 11:36 AM To: Edward Boadi; [hidden email] Subject: RE: System Missing Syntax Edward: Thanks for the help but when I pasted your syntax into a new window and ran it I got the following error messages. >USE ALL. >COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sy > smis(q4705) ) >FORMAT filter_sel (f1.0). >Error # 4381 in column 1. Text: FORMAT >The expression ends unexpectedly. >This command not executed. >FILTER BY filter_Sel. >Error # 4872 in column 11. Text: filter_Sel >The name of the filter variable is undefined. Either the variable has not >been defined or its name has been misspelled. >This command not executed. >EXECUTE . Any ideas? -----Original Message----- From: Edward Boadi [mailto:[hidden email]] Sent: Monday, August 28, 2006 10:24 AM To: Moffitt, James (West); [hidden email] Subject: RE: System Missing Syntax Try This : *Syntax creates a filter to select required records . USE ALL. COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sysmis(q4705) ) FORMAT filter_sel (f1.0). FILTER BY filter_Sel. EXECUTE . -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Jim Moffitt Sent: Monday, August 28, 2006 11:12 AM To: [hidden email] Subject: System Missing Syntax How do I write the syntax to select all cases in which q4701 has a value greater to or equal to 1 and q4702 through q4705 are all system missing? NOTE: I do not want to delete all other cases. TIA. |
In reply to this post by Jim Moffitt
Edward:
That does it! The syntax runs perfectly. Sorry I didn't catch the missing period. -----Original Message----- From: Edward Boadi [mailto:[hidden email]] Sent: Monday, August 28, 2006 10:39 AM To: Moffitt, James (West); [hidden email] Subject: RE: System Missing Syntax Sorry, there should be a period after : COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sysmis(q4705)). Thanks -----Original Message----- From: [hidden email] [mailto:[hidden email]] Sent: Monday, August 28, 2006 11:36 AM To: Edward Boadi; [hidden email] Subject: RE: System Missing Syntax Edward: Thanks for the help but when I pasted your syntax into a new window and ran it I got the following error messages. >USE ALL. >COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sy > smis(q4705) ) >FORMAT filter_sel (f1.0). >Error # 4381 in column 1. Text: FORMAT The expression ends >unexpectedly. >This command not executed. >FILTER BY filter_Sel. >Error # 4872 in column 11. Text: filter_Sel The name of the filter >variable is undefined. Either the variable has not >been defined or its name has been misspelled. >This command not executed. >EXECUTE . Any ideas? -----Original Message----- From: Edward Boadi [mailto:[hidden email]] Sent: Monday, August 28, 2006 10:24 AM To: Moffitt, James (West); [hidden email] Subject: RE: System Missing Syntax Try This : *Syntax creates a filter to select required records . USE ALL. COMPUTE filter_Sel =((q4701>=1)& Sysmis(q4702)& Sysmis(q4703)& Sysmis(q4704)& Sysmis(q4705) ) FORMAT filter_sel (f1.0). FILTER BY filter_Sel. EXECUTE . -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Jim Moffitt Sent: Monday, August 28, 2006 11:12 AM To: [hidden email] Subject: System Missing Syntax How do I write the syntax to select all cases in which q4701 has a value greater to or equal to 1 and q4702 through q4705 are all system missing? NOTE: I do not want to delete all other cases. TIA. |
Free forum by Nabble | Edit this page |