ell: Estimated log-likelihood.

Description Usage Arguments Value Author(s) Examples

View source: R/misc.R

Description

Estimated log-likelihood.

Usage

1
ell(s, y, delta)

Arguments

s

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

y

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

delta

Double. Box-Cox transformation parameter.

Value

Returns a single value which is estimated log-likelihood.

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)

dML <- search_delta(SI$s, SI$y, type = "ML")
ell(SI$s, SI$y, dML)

## End(Not run)

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