or2logor: Transform the effect estimates from the odds (ratio) to the...

Description Usage Arguments Details Value See Also Examples

View source: R/or2logor.R

Description

Transforms the posterior, sensitivity and learning estimates for the odds (ratio) in the given table to the log-odds (ratio) scale.

Usage

1
or2logor(tab)

Arguments

tab

A matrix with 16 rows and 16 columns, which has the same structure as the output of the sensitivity_learning_table_flexibe function (including the column names)

Details

Since the sensitivity and learning measures are invariant with respect to monotone transformations of the parameter, the sensitvity and learning estimates for the effect do not change under the log transformation.

Value

A matrix with 16 rows and 16 columns, which is identical to the input matrix tab, except that columns 5-8 have been recalculated and renamed as follows, where mu=log(OR) denotes the effect on the log-odds (ratio) scale:

median_post_mu

posterior median for the effect mu

95CrI_post_mu_low

lower end point of the 95 % shortest credible interval (CrI) for the effect mu

95CrI_post_mu_up

upper end point of the 95 % shortest CrI for the effect mu

length_95CrI_post_mu

length of the 95 % shortest CrI for the effect mu

See Also

sensitivity_learning_table_flexible

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Acute Graft rejection (AGR) data analyzed in Friede et al. (2017),  
# Sect. 3.2, URL: https://doi.org/10.1002/bimj.201500236
# First study: experimental group: 14 cases out of 61; 
# control group: 15 cases out of 20 
# Second study: experimental group: 4 cases out of 36; 
# control group: 11 cases out of 36 
rT <- c(14,4)
nT <- c(61,36)
rC <- c(15,11)
nC <- c(20,36)
df <- data.frame(y = log((rT*(nC-rC))/(rC*(nT-rT))), # log-OR
                 sigma = sqrt(1/rT+1/(nT-rT)+1/rC+1/(nC-rC)), # SE(log-OR)
                 labels = c(1:2))
  
# compute the table for the AGR data
# warning: it takes ca. 5-10 minutes to run this function
# on the above data set!
tab.OR <- sensitivity_learning_table_flexible(df)
tab.logOR <- or2logor(tab.OR)

sl4bayesmeta documentation built on Feb. 18, 2020, 3:02 p.m.