smr_data: Produce HSMR dataset

View source: R/smr_data.R

smr_dataR Documentation

Produce HSMR dataset

Description

Returns the minimal tidy data set for the HSMR dataset.

Usage

smr_data(smr01, index = c("M", "Q", "Y"), hospital_lookup)

Arguments

smr01

Input tibble for admissions, see details.

index

A character string specifying whether the data are to be produced monthly, quarterly or annually. Valid options are 'M', 'Q' and 'Y'.

hospital_lookup

A lookup tibble containing hospital names and location codes.

Details

smr_data expects a tibble with data extracted from SMR01 which has already been run through smr_wrangling, then smr_pmorbs and finally smr_model. The data must be run through these three functions first as smr_data is the final step of a four-step process.

Value

If the class is not initiated correctly, nothing is returned.


Public-Health-Scotland/hsmr documentation built on June 24, 2024, 1:48 a.m.