computing new variable based on percentiles

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

computing new variable based on percentiles

FernandezLanier, Adriana (DCJS)

Good afternoon. I hope my question makes sense. I was told that there is a function in SPSS that will compute a new variable based on designated percentiles (e.g., 25th, 75th). For example, I have a variable called “test score” and I want to collapse/recode it into a variable that reflects low, medium, and high (based on percentiles). I have searched but have not come across any SPSS function that will compute a new variable. Any thoughts? Thanks  

 

 

 

P Please consider the environment before printing this e-mail.

 



This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.
Reply | Threaded
Open this post in threaded view
|

Re: computing new variable based on percentiles

Maguin, Eugene
Fernandez, Look at the Rank command and the Ntiles subcommand. I haven't
used Ntiles but it seems to me that would do what you want.

Gene Maguin


>>Good afternoon. I hope my question makes sense. I was told that there is a
function in SPSS that will compute a new variable based on designated
percentiles (e.g., 25th, 75th). For example, I have a variable called "test
score" and I want to collapse/recode it into a variable that reflects low,
medium, and high (based on percentiles). I have searched but have not come
across any SPSS function that will compute a new variable. Any thoughts?
Thanks

=====================
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: computing new variable based on percentiles

FernandezLanier, Adriana (DCJS)
Yes, that did the job. Thanks! Adriana


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin
Sent: Wednesday, May 12, 2010 2:54 PM
To: [hidden email]
Subject: Re: computing new variable based on percentiles

Fernandez, Look at the Rank command and the Ntiles subcommand. I haven't
used Ntiles but it seems to me that would do what you want.

Gene Maguin


>>Good afternoon. I hope my question makes sense. I was told that there is a
function in SPSS that will compute a new variable based on designated
percentiles (e.g., 25th, 75th). For example, I have a variable called "test
score" and I want to collapse/recode it into a variable that reflects low,
medium, and high (based on percentiles). I have searched but have not come
across any SPSS function that will compute a new variable. Any thoughts?
Thanks

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


This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments.  Please notify the sender immediately by reply e-mail and delete the e-mail from your system.

=====================
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: computing new variable based on percentiles

Bruce Weaver
Administrator
In reply to this post by FernandezLanier, Adriana (DCJS)
FernandezLanier, Adriana (DCJS) wrote
Good afternoon. I hope my question makes sense. I was told that there is a function in SPSS that will compute a new variable based on designated percentiles (e.g., 25th, 75th). For example, I have a variable called "test score" and I want to collapse/recode it into a variable that reflects low, medium, and high (based on percentiles). I have searched but have not come across any SPSS function that will compute a new variable. Any thoughts? Thanks
Converting to categories is often not a very good idea.  See Dave Streiner's very readable article, for example.  It addresses dichotomization specifically, but his points apply to categorization generally.  

http://server03.cpa-apc.org:8080/Publications/archives/CJP/2002/april/researchMethodsDichotomizingData.asp

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: computing new variable based on percentiles

John F Hall
In reply to this post by FernandezLanier, Adriana (DCJS)
Adriana
 
try running frequencies with your variable (long printout as there is no longer /format condense) then choose your cutting points according to where you think they are in the cumulative frequencies column.  Viewer panel is free and no trees are felled!
 
syntax format:
 
recode oldvar (<range 1> = value1)(<range 2> = value2)(<range 3> = value3) etc etc
    into newvar eg ( replace ? with your cutting points) 
 
so you need to run something like:
 
 
freq testscore .
 
check the cumulative % column in your table and decide on your cutting points, then;
 
recode testscore (0 thru ? = 1)(? thru ? =2)(? thru ? = 3) etc etc (else = sysmis) into testscoregrp.
freq  testscoregrp.
 
Crude for perfectionists, but it works and saves your (and your funders') time and finger-nails.
 
If you don't understand syntax, let me know and I'll send you a worked example.  It takes forever with the menus.  It's the only use I can find for the otherwise pointless default output column Cumulative Percent (which has been there since the year dot, ie 1972 when I first used SPSS)
 
John Hall
 
----- Original Message -----
Sent: Wednesday, May 12, 2010 8:42 PM
Subject: computing new variable based on percentiles

Good afternoon. I hope my question makes sense. I was told that there is a function in SPSS that will compute a new variable based on designated percentiles (e.g., 25th, 75th). For example, I have a variable called “test score” and I want to collapse/recode it into a variable that reflects low, medium, and high (based on percentiles). I have searched but have not come across any SPSS function that will compute a new variable. Any thoughts? Thanks  

 

 

 

P Please consider the environment before printing this e-mail.

 



This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.
Reply | Threaded
Open this post in threaded view
|

Re: computing new variable based on percentiles

Marija Norusis
In reply to this post by FernandezLanier, Adriana (DCJS)
From the Transform Menu select Rank Cases then click on Rank Types. You can create all sorts of groupings based on the ranks or you can select Ntiles to create equal sized groups.
 
Marija Norusis
 
 
 
In a message dated 5/13/2010 4:44:38 P.M. Central Daylight Time, [hidden email] writes:
Adriana
 
try running frequencies with your variable (long printout as there is no longer /format condense) then choose your cutting points according to where you think they are in the cumulative frequencies column.  Viewer panel is free and no trees are felled!
 
syntax format:
 
recode oldvar (<range 1> = value1)(<range 2> = value2)(<range 3> = value3) etc etc
    into newvar eg ( replace ? with your cutting points) 
 
so you need to run something like:
 
 
freq testscore .
 
check the cumulative % column in your table and decide on your cutting points, then;
 
recode testscore (0 thru ? = 1)(? thru ? =2)(? thru ? = 3) etc etc (else = sysmis) into testscoregrp.
freq  testscoregrp.
 
Crude for perfectionists, but it works and saves your (and your funders') time and finger-nails.
 
If you don't understand syntax, let me know and I'll send you a worked example.  It takes forever with the menus.  It's the only use I can find for the otherwise pointless default output column Cumulative Percent (which has been there since the year dot, ie 1972 when I first used SPSS)
 
John Hall
 
----- Original Message -----
Sent: Wednesday, May 12, 2010 8:42 PM
Subject: computing new variable based on percentiles

Good afternoon. I hope my question makes sense. I was told that there is a function in SPSS that will compute a new variable based on designated percentiles (e.g., 25th, 75th). For example, I have a variable called “test score” and I want to collapse/recode it into a variable that reflects low, medium, and high (based on percentiles). I have searched but have not come across any SPSS function that will compute a new variable. Any thoughts? Thanks  

 

 

 

P Please consider the environment before printing this e-mail.

 



This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.