Learn R Programming

latrend (version 1.6.1)

PAP.adh1y: Biweekly Mean PAP Therapy 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

PAP.adh1y

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.

See Also

latrend-data

Examples

Run this code
data(PAP.adh1y)

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

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

Run the code above in your browser using DataLab