Filter

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Filter

Rhonda Boorman
When I ran the following syntax to exclude 2 cases from analysis, a total 5 cases were selected. The 3 new cases appear as dots in the filter column, not as 0 or 1.
I suspect it is the result of some previous command I have input because the 3 cases are id 97 98 and 99, my missing data codes which I was examining ages ago.
Can someone tell me what I have done, and how I can fix it?

USE ALL.

COMPUTE filter_$=(ID ~= 432 & ID ~= 194).

VARIABLE LABEL filter_$ 'ID ~= 432 & ID ~= 194 (FILTER)'.

VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.

FORMAT filter_$ (f1.0).

FILTER BY filter_$.

EXECUTE .

Regards

Rhonda

====================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
Reply | Threaded
Open this post in threaded view
|

R: Filter

Luca Meyer-3
Can this help?

data list free /ID (F3.0).
begin data
100
194
200
300
432
end data.
list.

compute filter_$=(ID<>194 AND ID<>432).
filter by filter_$.
list.

Luca

Mr. Luca MEYER
Market research, data analysis & more
www.lucameyer.com - Tel: +39.339.495.00.21


-----Messaggio originale-----
Da: SPSSX(r) Discussion [mailto:[hidden email]] Per conto di
Rhonda Boorman
Inviato: venerdì 15 febbraio 2008 3.00
A: [hidden email]
Oggetto: Filter

When I ran the following syntax to exclude 2 cases from analysis, a total 5
cases were selected. The 3 new cases appear as dots in the filter column,
not as 0 or 1.
I suspect it is the result of some previous command I have input because the
3 cases are id 97 98 and 99, my missing data codes which I was examining
ages ago.
Can someone tell me what I have done, and how I can fix it?

USE ALL.

COMPUTE filter_$=(ID ~= 432 & ID ~= 194).

VARIABLE LABEL filter_$ 'ID ~= 432 & ID ~= 194 (FILTER)'.

VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.

FORMAT filter_$ (f1.0).

FILTER BY filter_$.

EXECUTE .

Regards

Rhonda

=======
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

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.20.5/1279 - Release Date: 14/02/2008
18.35


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.20.5/1279 - Release Date: 14/02/2008
18.35

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Filter

Richard Ristow
In reply to this post by Rhonda Boorman
At 09:00 PM 2/14/2008, Rhonda Boorman wrote:

>When I ran the following syntax, a total 5 cases were selected. The
>3 new cases appear as dots in the filter column, not as 0 or 1.
>
>COMPUTE filter_$=(ID ~= 432 & ID ~= 194).
[etc.]
>I suspect it is the result of some previous command I have input
>because the 3 cases are id 97 98 and 99, my missing data codes which
>I was examining ages ago.

That's it. If 97 is a missing value for variable "ID", then the value of test

ID ~= 432

is 'MISSING', not 'TRUE'.

A simple fix (you'll have to do it in syntax) is to use the VALUE
function to override user-missing values:

COMPUTE filter_$=(VALUE(ID) ~= 432 & VALUE(ID) ~= 194).

=====================
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