knitr::opts_chunk$set(
  echo = TRUE, 
  warning = FALSE, 
  error = FALSE, 
  message = FALSE,
  fig.align = 'center',
  fig.width = 4,
  fig.height = 4,
  fig.asp = 0.618,
  out.width = "70%",
  collapse = TRUE,
  comment = "#>",
  fig.path = "figures/",
  tidy = FALSE
)

srir

Background

library(hexSticker)
logo <- "figures/lungwhite.png"
sri <- sticker(logo, 
        package="srir", 
        s_x = 1, # horizontal position of subplot
        s_y = 1.1, # vertical position of subplot
        s_width = 0.6, # width of subplot
        s_height = 0.6, # height of subplot
        p_size = 12, # font size
        p_x = 1, # horizontal position of font
        p_y = .45, # vertical position of font
        p_color = "grey", # font colour
        h_size = 3, # hexagon border size
        h_fill = "grey10", # hexagon fill colour
        h_color = "grey", # hexagon border colour
        url = "Severe Respiratory Insufficiency",
        u_size = 3,
        u_col = "grey",
        spotlight = TRUE,
        l_y = 1, 
        l_x = 0.8,
        l_height = 3,
        l_width = 3,
        filename = "figures/srir.png")
sri

The Severe Respiratory Insufficiency Questionnaire (SRI) is a multidimensional general health questionnaire "to assess HRQL in patients with chronic respiratory failure due to various underlying diseases" [@windisch_severe_2003]. Based on 49 items, seven sub scales and one total summary scale are calculated:

All scales have a score range between 0 and 100 with higher scores indicating a high burden of symptoms [@struik_severe_2013]. All items are scored on a 5-point Likert scale ranging from 1 (completely untrue) to 5 (always true). The majority of items need to be recoded (recoded value = 6 – raw value).

Package Description

With score_sri the package contains a function for scoring the Severe Respiratory Insufficiency Questionnaire (SRI). In addition, srir provides two simulated data frames containing SRI items:

Installation

devtools::install_github("nrkoehler/srir")

Examples

Scoring

library(srir)
df.sri.scores <- scoring_sri(df.full, id = 'id')
head(df.sri.scores)

Visualisation

library(dplyr)
library(tidyr)
library(ggplot2)
library(forcats)
library(srir)

mydata <- scoring_sri(df.full, id = 'id') %>%
  select(-id) %>%
    gather(key = scale, value = value) %>%
      group_by(scale) %>%
        summarize_all(mean) %>%
          ungroup()


ggplot(mydata, aes(value, fct_reorder(scale, value))) +
      geom_point(size = 3, colour = 'red3') +
      geom_text(label = round(mydata$value, 1), size = 3, nudge_x = 0.25, color = 'black') +
      theme_bw() +
      labs(x='Score', 
           y = 'Scale', 
           subtitle = 'Severe Respiratory Insufficiency Questionnaire (SRI)')

References



nrkoehler/srir documentation built on May 23, 2019, 9:03 p.m.