oecalc: Calculate the total O:E ratio

View source: R/oecalc.R

oecalcR Documentation

Calculate the total O:E ratio

Description

This function calculates (transformed versions of) the ratio of total number of observed versus expected events with the corresponding sampling variance.

Usage

oecalc(
  OE,
  OE.se,
  OE.cilb,
  OE.ciub,
  OE.cilv,
  EO,
  EO.se,
  citl,
  citl.se,
  N,
  O,
  E,
  Po,
  Po.se,
  Pe,
  data,
  slab,
  add = 1/2,
  g = NULL,
  level = 0.95,
  ...
)

Arguments

OE

vector with the estimated ratio of total observed versus total expected events

OE.se

Optional vector with the standard errors of the estimated O:E ratios.

OE.cilb

Optional vector to specify the lower limits of the confidence interval for OE.

OE.ciub

Optional vector to specify the upper limits of the confidence interval for OE.

OE.cilv

Optional vector to specify the levels of aformentioned confidence interval limits. (default: 0.95, which corresponds to the 95% confidence interval).

EO

Optional vector with the estimated ratio of total expected versus total observed events

EO.se

Optional vector with the standard errors of the estimated E:O ratios

citl

Optional vector with the estimated calibration-in-the-large statistics

citl.se

Optional vector with the standard error of the calibration-in-the-large statistics

N

Optional vector to specify the sample/group sizes.

O

Optional vector to specify the total number of observed events.

E

Optional vector to specify the total number of expected events

Po

Optional vector to specify the (cumulative) observed event probabilities.

Po.se

Optional vector with the standard errors of Po. For time-to-event data, these could also be the SE of the observed survival probabilities (e.g. as obtained from Kaplan-Meier analysis)

Pe

Optional vector to specify the (cumulative) expected event probabilites (if specified, during time t.val)

data

Optional data frame containing the variables given to the arguments above.

slab

Optional vector with labels for the studies.

add

a non-negative number indicating the amount to add to zero counts. See ‘Details’

g

a quoted string that is the function to transform estimates of the total O:E ratio; see the details below.

level

level for confidence interval, default 0.95.

...

Additional arguments.

Value

An object of class c("mm_perf","data.frame") with the following columns:

"theta"

The (transformed) O:E ratio.

"theta.se"

Standard errors of the (transformed) O:E ratio.

"theta.cilb"

Lower confidence interval of the (transformed) O:E ratios. The level is specified in level. Intervals are calculated on the same scale as theta by assuming a Normal distribution.

"theta.ciub"

Upper confidence interval of the (transformed) c-statistics. The level is specified in level. Intervals are calculated on the same scale as theta by assuming a Normal distribution.

"theta.source"

Method used for calculating the (transformed) O:E ratio.

"theta.se.source"

Method used for calculating the standard error of the (transformed) O:E ratio.

Author(s)

Thomas Debray <thomas.debray@gmail.com>

References

Debray TPA, Damen JAAG, Snell KIE, Ensor J, Hooft L, Reitsma JB, et al. A guide to systematic review and meta-analysis of prediction model performance. BMJ. 2017;356:i6460.

Debray TPA, Damen JAAG, Riley R, Snell KIE, Reitsma JB, Hooft L, et al. A framework for meta-analysis of prediction model studies with binary and time-to-event outcomes. Stat Methods Med Res. 2019 Sep;28(9):2768–86.

Snell KI, Ensor J, Debray TP, Moons KG, Riley RD. Meta-analysis of prediction model performance across multiple studies: Which scale helps ensure between-study normality for the C -statistic and calibration measures? Stat Methods Med Res. 2017.

Examples

######### Validation of prediction models with a binary outcome #########
data(EuroSCORE)

# Calculate the total O:E ratio and its standard error
est1 <- oecalc(O = n.events, E = e.events, N = n, data = EuroSCORE, slab = Study)
est1

# Calculate the log of the total O:E ratio and its standard error
est2 <- oecalc(O = n.events, E = e.events, N = n, data = EuroSCORE, slab = Study, g = "log(OE)")
est2

# Display the results of all studies in a forest plot
plot(est1)


metamisc documentation built on Sept. 25, 2022, 5:05 p.m.