Learn R Programming

R2MLwiN (version 0.8-9)

lmdp: Details of deaths from all causes in England and Wales 1972-1992, taken from the local mortality datapack

Description

This dataset records the annual number of deaths in a given district in England and Wales, covering 14 years (1972-1992) across 403 districts. Note that there are only 5639 observations rather than the 5642 that might be expected (403 districts with an observation for each of 14 years); 3 data points were removed because extreme outlying values made them implausible.

Usage

lmdp

Arguments

Format

A data frame with 5639 observations on the following 8 variables:

county

County (within region) identifier. There are 54 counties, coded from 1 to 68.

district

District (within county) identifier. There are 403 districts, coded 101 to 6820.

region

Region identifier. There are 10 regions, coded 1 to 10.

year

Year, 1979 (79) to 1992 (92).

deaths

Number of deaths observed

expected

Expected number of deaths, based on the 1992 national age- and sex- specific mortality rates.

smr

Standardised mortality ratio (observed deaths / expected deaths * 100).

family

District classification into one of 6 groups as defined by the UK's Office for National Statistics (factor with levels Inner_London (Inner London), Rural (Rural areas), Prospering (Prospering areas) Maturer (Maturer areas), Urban (Urban areas), Mining_industrial (Mining and industrial areas).

Details

The lmdp dataset is one of the example datasets analysed in Leyland and Groenewegen (2020), and provided with the multilevel-modelling software package MLwiN (Charlton et al., 2024).

Examples

Run this code

if (FALSE) {

data(lmdp, package = "R2MLwiN") 

# Example taken from Leyland and Groenewegen (2020)

lmdp$ID <- seq(1:nrow(lmdp))

(mod_1 <- runMLwiN(smr ~ 1 + I(year - 79) +
                      (1 | district) + (1 | ID),
                   data = lmdp))
}

Run the code above in your browser using DataLab