R/LOS_model.R

#' Hospital Length of Stay (LOS) Data
#'
#' Artificially generated hospital data. Fictional patients at 10 fictional hospitals, with LOS, Age and Date status data
#' Data were generate to learn Generalized Linear Models (GLM) concepts, modelling either Death or LOS.
#'
#' @docType data
#'
#' @keywords datasets hospital regression
#'
#' @format Data frame with five columns
#' \describe{
#' \item{ID}{A fictional patient ID number}
#' \item{Organisation}{A factor representing one of ten fictional hospital trusts, e.g. Trust1}
#' \item{Age}{Age in years of each fictional patient}
#' \item{LOS}{In-hospital length of stay in days.  The difference between admission and discharge date in dates}
#' \item{Death}{Binary for death status: 0 = survived, 1= died in hospital}
#' }
#'
#' @source Generated by Chris Mainey \email{chris.mainey@uhb.nhs.uk}, Feb-2019
#'
#' @usage data(LOS_model)
#'
#' @examples
#' data(LOS_model)
#'
#' model1 <- glm(Death ~ Age + LOS, data=LOS_model, family="binomial")
#' summary(model1)
#'
#' # Now with an Age, LOS, and Age*LOS interaction.
#' model2<- glm(Death ~ Age * LOS, data=LOS_model, family="binomial")
#' summary(model2)
#'
"LOS_model"

Try the NHSRdatasets package in your browser

Any scripts or data that you put into this service are public.

NHSRdatasets documentation built on March 14, 2021, 1:06 a.m.