|
The tough part is what to do with ties - which you did not mention -
and how to make sure that the last group is smallest. Check out "RANK" and see what is convenient to use. You can ask for quintiles. Or simple percentiles. You can specify how to handle ties and certain definitions for ranking instead of using 'average'. Then you can group the defined percentiles, if that is what you get, according to whatever guidelines you would apply by hand. -- Rich Ulrich ________________________________ > Date: Wed, 2 Mar 2011 20:12:45 -0800 > From: [hidden email] > Subject: Split a variable into 5 groups and compute usual stats > To: [hidden email] > > Hi All > SPSS 18.0 (Windows XP) > Would you please help me figure out how to split a sorted variable > SOLD$ into 5 groups (20% each, rounded up. The first 4 groups from > lowest to highest should be equal, and the last, highest priced, could > be higher or lower), and then compute usual stats (e.g., mean, N, > median, min, max, SD, etc.) for each group within each year month and > district. > > These results are based on a sample data file for 3 months in 2010 > (file is available if needed). However, my actual data file will have > monthly data for the last 20 years with over a 100 districts. I cannot > imagine recoding the SOLD$ variable manually. There must be an elegant > solution for this. ===================== 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 |
Administrator
|
In reply to this post by JASPAL CHEEMA
RANK
SORT SPLIT FILE whatever... Leaving the details to you after a perusal of the FM.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |