Learn R Programming

latrend (version 1.3.0)

OSA.adherence: Biweekly Mean Treatment Adherence of OSA Patients over 1 Year

Description

A simulated longitudinal dataset comprising 500 patients with obstructive sleep apnea (OSA) during their first year on CPAP therapy. The dataset contains the patient usage hours, averaged over 2-week periods.

The daily usage data underlying the downsampled dataset was simulated based on 7 different adherence patterns. The defined adherence patterns were inspired by the adherence patterns identified by Aloia et al. (2008), with slight adjustments

Usage

OSA.adherence

Arguments

Format

A data.frame comprising longitudinal data of 500 patients, each having 26 observations over a period of 1 year. Each row represents a patient observation interval (two weeks), with columns:

Patient

factor: The patient identifier, where each level represents a simulated patient.

Biweek

integer: Two-week interval index. Starts from 1.

MaxDay

integer: The last day used for the aggregation of the respective interval, integer

UsageHours

numeric: The mean hours of usage in the respective week. Greater than or equal to zero, and typically around 4-6 hours.

Group

factor: The reference group (i.e., adherence pattern) from which this patient was generated.

Examples

Run this code
# NOT RUN {
data(OSA.adherence)

if (require("ggplot2")) {
  plotTrajectories(OSA.adherence, id = "Patient", time = "Biweek", response = "UsageHours")

  # plot according to cluster ground truth
  plotTrajectories(OSA.adherence, id = "Patient", time = "Biweek", response = "UsageHours",
    cluster = "Group")
}
# }

Run the code above in your browser using DataLab