QQ: Pearson measure

Description Usage Arguments Value Author(s) Examples

View source: R/misc.R

Description

Pearson measure.

Usage

1
QQ(s, y, delta)

Arguments

s

Integer vector. Parsonnet Score values within a range of 0 to 100 representing the preoperative patient risk.

y

Numeric Vector. Binary (0/1) outcome values of each operation.

delta

Double. Box-Cox transformation parameter.

Value

Returns a single value.

Author(s)

Philipp Wittenberg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
## load data
data("cardiacsurgery", package = "spcadjust")

## preprocess data to 30 day mortality and subset data to
## phase I (In-control) and phase II (monitoring)
SALL <- cardiacsurgery %>% rename(s = Parsonnet) %>%
  mutate(y = ifelse(status == 1 & time <= 30, 1, 0),
         phase = factor(ifelse(date < 2*365, "I", "II")))

## subset phase I (In-control)
SI <- filter(SALL, phase == "I") %>% select(s, y)

dQQ <- search_delta(SI$s, SI$y, type = "Pearson")
QQ(SI$s, SI$y, dQQ)

## End(Not run)

vlad documentation built on Feb. 15, 2021, 5:12 p.m.