LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 16 Feb 2005 17:59:27 -0500
Reply-To:     Richard Ristow <wrristow@mindspring.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Richard Ristow <wrristow@mindspring.com>
Subject:      Re: displaying break variable values with a minimum # of n
Comments: To: "Silverman, Debbie" <Debbie.Silverman@maritz.com>
In-Reply-To:  <201D3B79B8DFE34F9CF690AFF325B1C803284FE9@fenexch05.us.mari
              tz.net>
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:

AGGREGATE OUTFILE=* /BREAK=INDP_VAR /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. AGGREGATE OUTFILE='c:\TMP\VL_COUNT.SAV' /BREAK=INDP_VAR /N_OCCUR 'Number of occurrences of IV value' = N. MATCH FILES /FILE=* /TABLE='c:\TMP\VL_COUNT.SAV' /BY INDP_VAR.


Back to: Top of message | Previous page | Main SPSSX-L page