Docsity

Count Values, Sort Classes - Statistical Package for Social Sciences - Lecture Slides, Slides of Economic statistics

Partial preview of the text

Download Count Values, Sort Classes - Statistical Package for Social Sciences - Lecture Slides and more Slides Economic statistics in PDF only on Docsity!

Count values,

Sort cases

Rank Variables

Objectives

At the end of this session you will

  • Be able to count the number of occurrences of the

same value across a list of variables.

  • Be able to sort a dataset using more than one index

variable

  • Understand the difference between sorting and

ranking a variable

Count menu and syntax

Finally click on OK

COUNT crops = cotton fruite maize rice sugar wheat (1).

VARIABLE LABELS crops 'Number of crops'. EXECUTE.

Sort cases

SORT CASES BY hhcode (A).

  • When you sort a data set, all the columns of the data set move together.
  • In SPSS you can sort cases by more than one variable. Just add them to the box “Sort by” or to the list of variables in the syntax

Ranking a variable

What is the resulting variable?

  • What is the difference between sorting and

ranking?