Raynald's SPSS Tools
  • Syntax
    • SPSS Syntax Home
    • Sample Syntax Library
    • Learning Syntax
    • Debugging SPSS Syntax
    • Standard Data Files
  • Macros
    • SPSS Macros — Home
    • Sample Macro Library
    • Learning Macros
    • Debugging Macros
    • Kirill's SPSS Macros Page
  • Scripts
    • SPSS Scripts — Home
    • Sample Scripts Library
    • Learning Scripts
    • The Asynchronous Problem
  • Python
    • Python Scripts Home
    • Sample Python Library
  • R
    • R Scripts — Home
    • Sample R Library
  • Resources
    • Resources Overview
    • Blog
    • Links to SPSS (and not only SPSS) resources
    • SPSS Programming and Data Management Book
  • Sitemap
  • Feedback
  • en
    • Русский
    • Español
    • Portugues
    • Deutsch
    • Français
    • Italiano
  1. Home
  2. Syntax
  3. Sample Syntax Library
  4. Ranking, largest values, sorting, grouping

Ranking, largest values, sorting, grouping

  • Aggregating with the median
  • Calculate cumulative sum of Var1
  • Calculate mode
  • Calculate number of distinct values within Case
  • Calculate z-scores across variables
  • Code using percentiles of a subset
  • Compute percentiles for one variable and by one or more grouping variables
  • Compute percentages based on values of first case
  • For each case, find the earliest case in the preceding 7 days
  • Find5 largest values within case
  • Find last 2 scores on repeated measure
  • Identify 3 Highest Values within Each Case Code to find 3 scores within each cases with largest values
  • Identify variables having minimum value
  • New variable equals cumulative totals by id
  • Number consecutively cases with the same id
  • Random order
  • Rank equal intervals between minimum and maximum
  • Rank on basis of percentage of good
  • Rank variable names in alpha order
  • Rank within cases
  • Replace missing by median values within the case
  • Round up to the higher point 5
  • Saving confidence interval for mean (within groups)
  • Score a test with an answer key
  • Sorting values within cases (using the bubble sort algorithm)
  • Sorting Within Cases Realization of several known sorting algorithm to order values within case
  • Syntax group data in bands
  • Finding All Modal Values for Subgroups of Cases Indentify all values which are modal values in every cases' subgroup (i.e. within same ID)
  • Create n tiles based on percent ranges rather than on count
Related pages

...

Navigate from here
  • Sample Syntax Library
  • Test if file or variable exists
  • Tests of Inequality
  • Aggregating with the median
  • Get random page
  • Back to top

 


 

Raynald's SPSS Tools © 2001–2025, Raynald Levesque, Anton Balabanov. Click to learn more: About the project