ps: Calculate the Probablility of Superiority

View source: R/eqps.R

psR Documentation

Calculate the Probablility of Superiority

Description

Calculate the Probablility of Superiority (PS) for the dimensions of two EQ-5D datasets. Score is less than 0.5 if more patients deteriorate than improve, 0.5 if the same number of patients improve and deteriorate or do not change and greater than 0.5 if more patients improve than deteriorate.

Usage

ps(
  pre,
  post,
  version = NULL,
  ignore.invalid = TRUE,
  dimensions = .get_dimension_names(),
  digits = 2
)

Arguments

pre

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

post

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

version

string of value "3L" or "5L" to indicate instrument version.

ignore.invalid

boolean whether to ignore invalid scores. TRUE returns NA, FALSE throws an error.

dimensions

character vector, specifying "dimension" column names. Defaults are "MO", "SC", "UA", "PD" and "AD".

digits

numeric specifying the number of decimal places. Defaults to 2.

Value

a list of Probability of Superiority scores by dimension.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))

pre <- dat[dat$Group=="Group1",][1:50,]
post <- dat[dat$Group=="Group2",][1:50,]

ps(pre, post, version="3L")


fragla/eq5d documentation built on Nov. 27, 2024, 3:23 a.m.