MyNixOS website logo
Description

Tools to Score Patient-Reported Outcome (PRO) and Other Psychometric Measures.

Provides a reliable and flexible toolbox to score patient-reported outcome (PRO), Quality of Life (QOL), and other psychometric measures. The guiding philosophy is that scoring errors can be eliminated by using a limited number of well-tested, well-behaved functions to score PRO-like measures. The workhorse of the package is the 'scoreScale' function, which can be used to score most single-scale measures. It can reverse code items that need to be reversed before scoring and pro-rate scores for missing item data. Currently, three different types of scores can be output: summed item scores, mean item scores, and scores scaled to range from 0 to 100. The 'PROscorerTools' functions can be used to write new functions that score more complex measures. In fact, 'PROscorerTools' functions are the building blocks of the scoring functions in the 'PROscorer' package (which is a repository of functions that score specific commonly-used instruments). Users are encouraged to use 'PROscorerTools' to write scoring functions for their favorite PRO-like instruments, and to submit these functions for inclusion in 'PROscorer' (a tutorial vignette will be added soon). The long-term vision for the 'PROscorerTools' and 'PROscorer' packages is to provide an easy-to-use system to facilitate the incorporation of PRO measures into research studies in a scientifically rigorous and reproducible manner. These packages and their vignettes are intended to help establish and promote "best practices" for scoring and describing PRO-like measures in research.

CRAN_Status_Badge

CoverageStatus

PROscorerTools

Overview

PROscorerTools provides tools to score patient-reported outcome (PRO) measures and other quality of life (QoL) and psychometric instruments. PROscorerTools also provides the building blocks of the functions in the PROscorer package.

PROscorerTools contains several “helper” functions, each of which performs a specific task that is common when scoring PRO-like instruments (e.g., reverse coding items). But most users will find that the scoreScale() function alone can address their scoring needs.

The scoreScale() Function

The workhorse function in PROscorerTools is the scoreScale() function. Its basic job is to take a data frame containing responses to some items, and output a single score for those items.

The scoreScale() function has simple, flexible arguments that enable it to handle nearly all scoring situations.

Features:

  • Reverse Coding: Before calculating a score, scoreScale() can reverse code all of the items, only some specific items, or none of the items (no reverse coding is the default).

  • Different Types of Scores: Some instruments need to be scored by summing item responses, others by taking the mean of item responses, and others by re-scaling the sum or mean scores to range from 0 to 100. All 3 of these score types are available in the scoreScale() function.

  • Calculation of Scores with Missing Items: For most instruments, valid scores can be obtained despite a certain number of missing item responses. For example, on the EORTC QLQ-C30, a score can be calculated as long as at least 50% of items on a given scale are non-missing. The scoreScale() function allows the user to specify the proportion of missing items that is allowed, and the score is prorated to be comparable to scores with no missing items. If a respondent has more than the allowed proportion of missing items, then that respondent will be assigned a missing score (e.g., NA).

  • Scoring Instruments with Multiple Scores: More complex instruments that yield more than a single score can be scored by combining multiple calls to the scoreScale() function. In fact, most of the functions in the PROscorer package call scoreScale() multiple times.

Installation and Basic Usage

Install the stable version from CRAN (recommended):

install.packages("PROscorerTools")

If you want to contribute to the development of the PROscorerTools or PROscorer packages, then you can install the development version from GitHub (generally NOT recommended):

devtools::install_github("MSKCC-Epi-Bio/PROscorerTools")

Load PROscorerTools in your R workspace:

library(PROscorerTools)

As an example, we will use the makeFakeData() function to make a data frame of responses to 6 fake items from 20 imaginary respondents. The created data set (named “dat”) has an “id” variable, plus responses to 6 items (named “q1”, “q2”, etc.) from 20 imaginary respondents. There are also missing responses (“NA”) scattered throughout.

dat <- makeFakeData(n = 20, nitems = 6, values = 0:4, id = TRUE)

Below we use the scoreScale function to score the fake responses in “dat”. We use the items argument to tell scoreScale which variables are the items we want to score. We will score the items by summing the responses (type = "sum"). We will save the scores from the fake questionnaire in a data frame named “dat_scored”.

dat_scored <- scoreScale(df = dat, items = 2:7, type = "sum")
dat_scored

By default, scoreScale will score the items for a given respondent as long as the respondent is missing no more than 50% of the items. This can be changed with the okmiss argument. Above, okmiss = 0.50 by default, so a respondent could be missing 3 of the 6 items and still be assigned a score (if missing 4 or more items, they were assigned a score of NA). Below, we again score the items, but this time we allow less than half of the items to be missing to be scored (okmiss = 0.49).

dat_scored <- scoreScale(df = dat, items = 2:7, type = "sum", okmiss = 0.49)
dat_scored

For more information on the scoreScale function, you can access its “help” page by typing ?scoreScale into R.

Resources for More Information

  • You can access the “help” page for “PROscorerTools” package by typing ?PROscorerTools into R.

  • Check out the PROscorerTools vignettes.

  • For examples on how to use the scoreScale function within a more complex scoring function, check out the source code for some of the functions in the PROscorer package.

Metadata

Version

0.0.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows