```Date: Mon, 16 Jan 2006 15:37:40 +0100 Reply-To: Spousta Jan Sender: "SPSSX(r) Discussion" From: Spousta Jan Subject: Re: Percentiles Content-Type: text/plain; charset="us-ascii" Yes, thank you - I wrote already to Art Kendall who devised this idea an hour ago that in the morning after the busy weekend I am usually not able to remember all the important things I should keep in mind :-) Greetings Jan -----Original Message----- From: Peck, Jon [mailto:peck@spss.com] Sent: Monday, January 16, 2006 3:31 PM To: Spousta Jan; SPSSX-L@LISTSERV.UGA.EDU Subject: RE: Re: [SPSSX-L] Percentiles Remember that the RANK command can compute the ranks and percentiles as a new variable, after which you can these values in transformations. Regards, Jon Peck SPSS -----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Spousta Jan Sent: Monday, January 16, 2006 3:02 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: [SPSSX-L] Percentiles Hi Luca and all, I think that Greg's solution is very nice and simple, but has severe limitations: It is valid only if the variable x is Gaussian and the number of cases is huge - then the asymptotics works. But in general case one must apply exact algorithms, i.e. compute the true values of percentiles first. Here is an example: * save the percentile in a file. GET FILE='C:\Program Files\SPSS13\GSS93 subset.sav'. oms /SELECT TABLES /IF LABELS = ["Statistics"] /DESTINATION FORMAT=sav OUTFILE = 'C:\Program Files\SPSS13\auxfile.sav'. FREQUENCIES age /FORM=NOTABLE /PERC= 20. omsend. get file='C:\Program Files\SPSS13\auxfile.sav'. select if Var1 = "Percentiles". save outfile='C:\Program Files\SPSS13\auxfile.sav'. * open the original file again and merge the percentile. GET FILE='C:\Program Files\SPSS13\GSS93 subset.sav'. string Var1 (a11). compute Var1 = "Percentiles". MATCH FILES /FILE=* /TABLE='C:\Program Files\SPSS13\auxfile.sav' /BY Var1 /drop Command_ Subtype_ Label_ Var2 Var3. EXECUTE. * compute the transformed variable y. compute y = age <= Var4. exe. var lab y "Age is <= 20th percentile of Age (1-0)". form y (f2). del var Var1 Var4. Greetings Jan -----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Meyer, Gregory J Sent: Saturday, January 14, 2006 6:51 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Percentiles Luca, assuming you are interested in using a sample determined percentile, here's one way to do what you want. * Convert observed scores to standardized Z scores using the M and SD from your sample . DESCRIPTIVES VARIABLES= X (X_zscore) /SAVE . * Because a Z score of -.84 cuts off the lowest 20% of the distribution, recode based on the X_zscore variable. RECODE r_zscore (Lowest thru -.84 = 1) (ELSE = 0) INTO Y . EXECUTE . * Note, the cut off value can be modified to any percentile you desire using the normal curve equivalents found in the back of any stats book . Greg | -----Original Message----- | From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf | Of Luca Meyer | Sent: Saturday, January 14, 2006 2:59 AM | To: SPSSX-L@LISTSERV.UGA.EDU | Subject: Percentiles | | Is there any easy way to compute a X percentile of a variable? What i | need is something like: | | IF X<=PERCENTILE(20) Y=1. | | That is: if the value of X for each single case is lower or equal to | the 20% percentile of X then Y=1. | | Is this somehow possible? | | Thanks, | Luca | | Mr. Luca MEYER | Survey research, data analysis & more: http://www.lucameyer.com/ | Tel: +390122854456 - Fax: +391782232575 - Mobile: + 393394950021 | ```

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