Date: Wed, 16 Feb 2005 17:59:27 -0500
Reply-To: Richard Ristow <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <firstname.lastname@example.org>
Subject: Re: displaying break variable values with a minimum # of n
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 09:17 AM 2/5/2005, Silverman, Debbie wrote:
>I have an independent variable with about 30 values. I want to display
>means, top box, and n's for any value that has a minimum n in a table
>I can export.
This isn't quite clear, but it sounds like you want to "display means,
top box, and n's" for a DEPENDENT VARIABLE for "any [independent
variable] value that has a minimum n".
I'm assuming by "top box" you mean "values more than 1.5 interquartile
ranges" above the upper Tukey's hinge. (I'm taking this from the
documentation for SPSS command EXAMINE). If so, that's harder. But you
can get counts, means, and other statistics by independent-variable
value using AGGREGATE:
/N_OCCUR 'Number of occurrences of IV value' = N
/MEAN_DEP 'Mean value of dependent variable' = MEAN(DPND_VAR).
This replaces the working file with a file containing variables
INDP_VAR, N_OCCUR, and MEAN_DEP, as described above. It will have one
case for each value of INDP_VAR, i.e. "about 30".
See documentation on command AGGREGATE for more options.
For more elaborate computations, you may want to keep your original
data, but add the number of occurrences of the independent-variable
value to each case. To do this, you lose the sort order of the original
data; if that matters, make sure you can sort back into the order you
want afterward. There's a simpler method in SPSS 13, but before that
(using c:\TMP\VL_COUNT.SAV for temporary storage),
SORT CASES BY INDP_VAR.
/N_OCCUR 'Number of occurrences of IV value' = N.