# Chapter 13 Histogram

## 13.1 Intro

Histograms are normally used to inspect the distribution of continuous (cardinal, e.g. interval or ratio-level) variables.

### 13.1.1 Example dataset

This example uses the Rosetta Stats example dataset “pp15” (see Chapter 1 for information about the datasets and Chapter 3 for an explanation of how to load datasets).

### 13.1.2 Variable(s)

From this dataset, this example uses variable xtcUsePillHigh.

## 13.3 Input: R

Use the following command (this requires the rosetta package to be installed, see section 2.3.2, and the example dataset to be stored under name dat, see section 3):

hist(dat\$xtcUsePillHigh);

## 13.4 Input: SPSS GUI

First activate the dat dataset (see 2.4.1).

## 13.5 Input: SPSS Syntax

Use the following command (this requires the dat dataset to be the active dataset, see 2.4.1):

GRAPH /HISTOGRAM(NORMAL) = xtcUsePillHigh.