help please.. grouping and percentile

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 1
Joined: Sun Nov 24, 2013 12:54 pm

help please.. grouping and percentile

Postby bebx » Mon Nov 25, 2013 8:51 pm

Hi all,
thank you in advanced for your help.
2 files is attached, SPSS and image file.
The SPSS file contain "week" column (value repeated) , that I want to group the same week and make mean and percentile of "BPD" column.
The image file contains example based on SPSS made by statistician.
How can I create this table ?
Thanks again
You do not have the required permissions to view the files attached to this post.
Posts: 116
Joined: Sat Oct 06, 2012 6:21 am

Re: help please.. grouping and percentile

Postby » Tue Nov 26, 2013 6:38 am

The N, mean, median (...) are easily done with basic AGGREGATE ( The percentiles are more complicated though. One way to do it is

-Run "split files" on week
-Run an OMS block for capturing the table from "frequencies" as a new dataset
-Run frequencies with "format = notable" and all desired statistics
-Run omsend
-Clean up the resulting dataset
-Run casestovars on it

Honestly, you'll need to master SPSS at a reasonable level in order to pull this off. If it's too much of a challenge, let us know where you get stuck, OK?
Kind regards,

Ruben Geert van den Berg
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: help please.. grouping and percentile

Postby GerineL » Tue Dec 03, 2013 12:45 pm

- alternatively, you could also add a case-within-week casenumb using lag.
- then use aggregate(n) to get number of cases within each week (e.g.: cases_n = 20).
- Then determine what case to use for each, so for instance:
compute case_fifthperc = rnd(cases_n/20). (to get fifth percentile).
- then if (casewithinweek = case_fifthperc) fifthpercentile = bpd).

Who is online

Users browsing this forum: No registered users and 3 guests