A small synthetic dataset demonstrating various participation patterns
in longitudinal data, suitable for examples with xtdescribe.
Format
A data frame with 30 rows and 4 variables:
- patient_id
Integer: Patient identifier (1-10).
- year
Integer: Year of measurement (2020-2024).
- blood_pressure
Numeric: Systolic blood pressure measurement.
- treatment
Character: Treatment group ("A" or "B").
Details
This dataset includes 10 patients measured at up to 5 time points (years 2020-2024). The dataset demonstrates various participation patterns typical in longitudinal studies:
Complete participation (all time points)
Early dropout
Late entry
Intermittent participation
Single time point participation
Examples
data(xt_example)
head(xt_example)
#> patient_id year blood_pressure treatment
#> 1 1 2020 129.3 A
#> 2 1 2021 120.5 B
#> 3 1 2022 131.6 A
#> 4 1 2023 139.1 B
#> 5 1 2024 125.6 A
#> 6 2 2020 117.6 B
summary(xt_example)
#> patient_id year blood_pressure treatment
#> Min. : 1.000 Min. :2020 Min. : 93.7 Length:30
#> 1st Qu.: 2.000 1st Qu.:2021 1st Qu.:115.2 Class :character
#> Median : 4.000 Median :2022 Median :120.7 Mode :character
#> Mean : 4.233 Mean :2022 Mean :123.1
#> 3rd Qu.: 6.000 3rd Qu.:2023 3rd Qu.:130.7
#> Max. :10.000 Max. :2024 Max. :162.8