Learn R Programming

vlad (version 0.1.0)

llr_score: Compute the log-likelihood ratio score

Description

Compute the log-likelihood ratio score.

Usage

llr_score(df, coeff, R0 = 1, RA = 2, yemp = TRUE)

Arguments

df

DataFrame. First column are Parsonnet Score values within a range of zero to 100 representing the preoperative patient risk. The second column are binary (0/1) outcome values of each operation.

coeff

NumericVector. Estimated coefficients \(\alpha\) and \(\beta\) from the binary logistic regression model.

R0

double. Odds ratio of death under the null hypotheses.

RA

double. Odds ratio of death under the alternative hypotheses. Detecting deterioration in performance with increased mortality risk by doubling the odds Ratio RA=2. Detecting improvement in performance with decreased mortality risk by halving the odds ratio of death RA=1/2.

yemp

boolean. If TRUE use observed outcome value, if FALSE use estimated binary logistc regression model.

Value

Returns a single value which is the log-likelihood ratio score.

References

Steiner SH, Cook RJ, Farewell VT and Treasure T (2000). <U+201C>Monitoring surgical performance using risk-adjusted cumulative sum charts.<U+201D> Biostatistics, 1(4), pp. 441-452. doi: 10.1093/biostatistics/1.4.441.

Steiner S (2014). <U+201C>Risk-Adjusted Monitoring of Outcomes in Health Care.<U+201D> In Lawless JF (ed.), Statistics in Action, pp. 225-242. Informa UK Limited. doi: 10.1201/b16597-15.

Examples

Run this code
# NOT RUN {
require(vlad)
# see Steiner et al. (2000) p. 446 or Steiner (2014) p. 234
coeff <- c("(Intercept)"=-3.68, "Parsonnet"=0.077)
# Log-likelihood ratio scores for detecting an increase in the failure rate:
# low risk patients with a Parsonnet score of zero

llr_score(df=data.frame(as.integer(0), 0), coeff=coeff, RA=2)
llr_score(df=data.frame(as.integer(0), 1), coeff=coeff, RA=2)

# higher risk patients with a Parsonnet score of 50
llr_score(df=data.frame(as.integer(50), 0), coeff=coeff, RA=2)
llr_score(df=data.frame(as.integer(50), 1), coeff=coeff, RA=2)

# see Steiner (2014) p. 234
# Log-likelihood ratio scores for detecting an decrease in the failure rate:
# low risk patients with a Parsonnet score of zero
llr_score(df=data.frame(as.integer(0), 0), coeff=coeff, RA=1/2)
llr_score(df=data.frame(as.integer(0), 1), coeff=coeff, RA=1/2)

# higher risk patients with a Parsonnet score of 50
llr_score(df=data.frame(as.integer(50), 0), coeff=coeff, RA=1/2)
llr_score(df=data.frame(as.integer(50), 1), coeff=coeff, RA=1/2)
# }

Run the code above in your browser using DataLab