Simplifying work with SPSS v13

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

Simplifying work with SPSS v13

Juan Pablo Sandoval
Hi Group:

I´m using SPSS V13 and this is the problem I have: I have a database with 3
variables cond1,
cond2, cond3, each variable is a condition expressed by a person.

I do a freq of the variable cond1 and I check those options that have
10 or more cases, I filter for every option of cond1 that has 10 or
more cases and I do another frequency,so I endup with a frequency of
cond2 for every variable of cond1 that has 10 or more cases. And I do
the same for cond2 and cond3.

I´ve been trying to do this with the aggregate command but can´t seem
to find and answer that does this in a simper way, any ideas???

====================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: Simplifying work with SPSS v13

Richard Ristow
At 08:41 PM 7/6/2008, Juan Pablo Sandoval wrote:

>I have a database with 3 variables cond1, cond2, cond3
>
>I do a freq of the variable cond1 and I check those options that
>have 10 or more cases, I filter for every option of cond1 that has
>10 or more cases

This should do that in syntax, though the code is not tested. It is
not necessary for the data to be sorted by cond1. The code does
assume your data is unweighted.

AGGREGATE OUTFILE=* MODE=ADDVARIABLES
   /BREAK=cond1
   /NOccur1 "No. of occurrences of this case's value of 'cond1'" = NU.

COMPUTE   c1.10 = NOccur1 GE 10.
FORMATS   c1.10 (F2).
VAR LABEL c1.10 "At least 10 occurrences of current value of 'cond1'".
FILTER BY c1.10.

>I do another frequency,so I endup with a frequency of cond2 for
>every variable of cond1 that has 10 or more cases.

Do the above, and then

FREQUENCIES cond2.

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