Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

voting

Data on Social Mobility and the Labour Vote


Description

Voting data from the 1987 British general election, cross-classified by the class of the head of household and the class of their father.

Usage

voting

Format

A data frame with 25 observations on the following 4 variables.

percentage

the percentage of the cell voting Labour.

total

the cell count.

origin

a factor describing the father's class with levels 1:5.

destination

a factor describing the head of household's class with levels 1:5.

Source

Clifford, P. and Heath, A. F. (1993) The Political Consequences of Social Mobility. J. Roy. Stat. Soc. A, 156(1), 51-61.

Examples

### Examples from Clifford and Heath paper
### (Results differ slightly - possible transcription error in
### published data?)
set.seed(1)

## reconstruct counts voting Labour/non-Labour
count <- with(voting, percentage/100 * total)
yvar <- cbind(count, voting$total - count)

## fit diagonal reference model with constant weights
classMobility <- gnm(yvar ~ -1 + Dref(origin, destination), 
                     family = binomial, data = voting)
DrefWeights(classMobility)

## create factors indicating movement in and out of salariat (class 1)
upward <- with(voting, origin != 1 & destination == 1)
downward <- with(voting, origin == 1 & destination != 1)

## fit separate weights for the "socially mobile" groups
socialMobility <- gnm(yvar ~ -1 + Dref(origin, destination,
                                       delta = ~ 1 + downward + upward),
                      family = binomial, data = voting)
DrefWeights(socialMobility)

## fit separate weights for downwardly mobile groups only
downwardMobility <- gnm(yvar ~ -1 + Dref(origin, destination,
                                         delta = ~ 1 + downward),
                        family = binomial, data = voting)
DrefWeights(downwardMobility)

gnm

Generalized Nonlinear Models

v1.1-1
GPL-2 | GPL-3
Authors
Heather Turner [aut, cre] (<https://orcid.org/0000-0002-1256-3375>), David Firth [aut] (<https://orcid.org/0000-0003-0302-2312>), Brian Ripley [ctb], Bill Venables [ctb], Douglas M. Bates [ctb], Martin Maechler [ctb] (<https://orcid.org/0000-0002-8685-9910>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.