Skip to contents

`raw_promis` contains simulated PROMIS Sleep-related questionnaire data collected from two synthetic participants (`P01`, `P02`) at three study stages: **Registration**, **Day‑7**, and **Day‑14**. The dataset is fully synthetic, designed for demonstration, examples, and testing of PROMIS‑related processing workflows in the `hypometrics` package.

`raw_promis` contains **synthetic PROMIS Sleep questionnaire data** for two simulated participants across three study stages: "Registration", "Day-7", and "Day-14". The dataset includes eight PROMIS Sleep item responses (1–5 Likert scale) alongside participant identifiers and timestamped assessments.

Usage

raw_promis

raw_promis

Format

A tibble with the following columns:

userid

Character string identifying the participant ("P01", "P02").

stage

Character variable: one of "Registration", "Day-7", "Day-14".

localTimestamp

Character ISO‑8601 timestamp with milliseconds and UTC offset.

Sleep115

Integer (1–5) PROMIS item response.

Sleep116

Integer (1–5) PROMIS item response.

Sleep90

Integer (1–5) PROMIS item response.

Sleep110

Integer (1–5) PROMIS item response.

Sleep44

Integer (1–5) PROMIS item response.

Sleep87

Integer (1–5) PROMIS item response.

Sleep108

Integer (1–5) PROMIS item response.

Sleep109

Integer (1–5) PROMIS item response.

A tibble with the following variables:

userid

Character ID for the participant ("P01", "P02").

stage

Character: "Registration", "Day-7", "Day-14".

localTimestamp

Character ISO‑8601 timestamp with milliseconds and UTC offset.

Sleep115

Integer 1–5: satisfaction with sleep.

Sleep116

Integer 1–5: refreshing quality of sleep.

Sleep90

Integer 1–5: trouble sleeping.

Sleep110

Integer 1–5: perceived adequacy of sleep.

Sleep44

Integer 1–5: difficulty falling asleep.

Sleep87

Integer 1–5: trouble staying asleep.

Sleep108

Integer 1–5: restless sleep.

Sleep109

Integer 1–5: overall sleep quality.

Details

Participants

  • "P01" — first assessment at "2026‑01‑01 07:17:00" UTC

  • "P02" — first assessment at "2026‑01‑02 15:52:00" UTC

Follow-up timestamps occur exactly 7 days and 14 days after the Registration timestamp for each participant.

PROMIS Items

The dataset includes 8 PROMIS Sleep items commonly used in PROMIS Sleep Disturbance and PROMIS Sleep-Related Impairment instruments. Each item is a Likert response with values from **1 to 5**:

  • Sleep115

  • Sleep116

  • Sleep90

  • Sleep110

  • Sleep44

  • Sleep87

  • Sleep108

  • Sleep109

Generation script

This dataset is created using the reproducible script:


  data-raw/simulate_raw_promis.R

This dataset is fully simulated and intended for demonstration, package examples, and testing workflows within `hypometrics`.

Participants and timing

  • "P01" — Registration at "2026-01-01 07:17:00" UTC

  • "P02" — Registration at "2026-01-02 15:52:00" UTC

Follow‑up assessments occur exactly **7** and **14** days after registration. PROMIS Sleep Items (all 1–5 Likert responses)

Each variable corresponds to a validated PROMIS Sleep item:

Sleep115

"I was satisfied with my sleep".

Sleep116

"My sleep was refreshing".

Sleep90

"I had trouble sleeping".

Sleep110

"I got enough sleep".

Sleep44

"I had difficulty falling asleep".

Sleep87

"I had trouble staying asleep".

Sleep108

"My sleep was restless".

Sleep109

"My sleep quality was …" (standard PROMIS item stem).

Generation script

This dataset is reproducibly generated by:


data-raw/simulate_raw_promis.R

Examples

data(raw_promis, package = "hypometrics")

# View structure
dplyr::glimpse(raw_promis)
#> Rows: 6
#> Columns: 11
#> $ userid         <chr> "P01", "P01", "P01", "P02", "P02", "P02"
#> $ stage          <chr> "Day-14", "Day-7", "Registration", "Day-14", "Day-7", "…
#> $ localTimestamp <chr> "2026-01-15T07:17:00.000+00:00", "2026-01-08T07:17:00.0…
#> $ Sleep115       <int> 5, 3, 1, 2, 4, 5
#> $ Sleep116       <int> 2, 2, 1, 3, 2, 1
#> $ Sleep90        <int> 3, 3, 2, 5, 2, 4
#> $ Sleep110       <int> 4, 5, 3, 1, 1, 5
#> $ Sleep44        <int> 1, 2, 4, 1, 1, 2
#> $ Sleep87        <int> 1, 4, 5, 1, 3, 3
#> $ Sleep108       <int> 2, 3, 5, 3, 4, 5
#> $ Sleep109       <int> 4, 4, 2, 2, 1, 5

# Filter P01 data
raw_promis %>% dplyr::filter(userid == "P01")
#> # A tibble: 3 × 11
#>   userid stage localTimestamp Sleep115 Sleep116 Sleep90 Sleep110 Sleep44 Sleep87
#>   <chr>  <chr> <chr>             <int>    <int>   <int>    <int>   <int>   <int>
#> 1 P01    Day-… 2026-01-15T07…        5        2       3        4       1       1
#> 2 P01    Day-7 2026-01-08T07…        3        2       3        5       2       4
#> 3 P01    Regi… 2026-01-01T07…        1        1       2        3       4       5
#> # ℹ 2 more variables: Sleep108 <int>, Sleep109 <int>

# PROMIS summary
raw_promis %>%
  dplyr::group_by(userid, stage) %>%
  dplyr::summarise(
    across(dplyr::starts_with("Sleep"), mean),
    .groups = "drop"
  )
#> # A tibble: 6 × 10
#>   userid stage       Sleep115 Sleep116 Sleep90 Sleep110 Sleep44 Sleep87 Sleep108
#>   <chr>  <chr>          <dbl>    <dbl>   <dbl>    <dbl>   <dbl>   <dbl>    <dbl>
#> 1 P01    Day-14             5        2       3        4       1       1        2
#> 2 P01    Day-7              3        2       3        5       2       4        3
#> 3 P01    Registrati…        1        1       2        3       4       5        5
#> 4 P02    Day-14             2        3       5        1       1       1        3
#> 5 P02    Day-7              4        2       2        1       1       3        4
#> 6 P02    Registrati…        5        1       4        5       2       3        5
#> # ℹ 1 more variable: Sleep109 <dbl>
data(raw_promis, package = "hypometrics")

# Inspect structure
dplyr::glimpse(raw_promis)
#> Rows: 6
#> Columns: 11
#> $ userid         <chr> "P01", "P01", "P01", "P02", "P02", "P02"
#> $ stage          <chr> "Day-14", "Day-7", "Registration", "Day-14", "Day-7", "…
#> $ localTimestamp <chr> "2026-01-15T07:17:00.000+00:00", "2026-01-08T07:17:00.0…
#> $ Sleep115       <int> 5, 3, 1, 2, 4, 5
#> $ Sleep116       <int> 2, 2, 1, 3, 2, 1
#> $ Sleep90        <int> 3, 3, 2, 5, 2, 4
#> $ Sleep110       <int> 4, 5, 3, 1, 1, 5
#> $ Sleep44        <int> 1, 2, 4, 1, 1, 2
#> $ Sleep87        <int> 1, 4, 5, 1, 3, 3
#> $ Sleep108       <int> 2, 3, 5, 3, 4, 5
#> $ Sleep109       <int> 4, 4, 2, 2, 1, 5

# Filter for P01 only
raw_promis %>% dplyr::filter(userid == "P01")
#> # A tibble: 3 × 11
#>   userid stage localTimestamp Sleep115 Sleep116 Sleep90 Sleep110 Sleep44 Sleep87
#>   <chr>  <chr> <chr>             <int>    <int>   <int>    <int>   <int>   <int>
#> 1 P01    Day-… 2026-01-15T07…        5        2       3        4       1       1
#> 2 P01    Day-7 2026-01-08T07…        3        2       3        5       2       4
#> 3 P01    Regi… 2026-01-01T07…        1        1       2        3       4       5
#> # ℹ 2 more variables: Sleep108 <int>, Sleep109 <int>

# Summarise item means by stage
raw_promis %>%
  dplyr::group_by(userid, stage) %>%
  dplyr::summarise(
    across(dplyr::starts_with("Sleep"), mean),
    .groups = "drop"
  )
#> # A tibble: 6 × 10
#>   userid stage       Sleep115 Sleep116 Sleep90 Sleep110 Sleep44 Sleep87 Sleep108
#>   <chr>  <chr>          <dbl>    <dbl>   <dbl>    <dbl>   <dbl>   <dbl>    <dbl>
#> 1 P01    Day-14             5        2       3        4       1       1        2
#> 2 P01    Day-7              3        2       3        5       2       4        3
#> 3 P01    Registrati…        1        1       2        3       4       5        5
#> 4 P02    Day-14             2        3       5        1       1       1        3
#> 5 P02    Day-7              4        2       2        1       1       3        4
#> 6 P02    Registrati…        5        1       4        5       2       3        5
#> # ℹ 1 more variable: Sleep109 <dbl>