ps | R Documentation |
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.
ps(
pre,
post,
version = NULL,
ignore.invalid = TRUE,
dimensions = .get_dimension_names(),
digits = 2
)
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. |
a list of Probability of Superiority scores by dimension.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.