deft_prepare: Prepare log transformation data for effect size estimation...

Description Usage Arguments Value Author(s) References Examples

View source: R/deft_prepare.R

Description

A variety of different outcome measures which used in meta-analysis as input are in the form of log, such as hazard ratio (HR). This function is used to do log transformation to calculate effect size and standard error. Then the result can be easier used for model fit.

Usage

1
deft_prepare(data, conf_level = 0.05)

Arguments

data

a data.frame contains at least columns 'trial', 'hr', 'ci.lb', 'ci.ub' and 'ni'.

conf_level

a number specify confidence level, default is 0.05.

Value

a data.frame

Author(s)

Shixiang Wang w_shixiang@163.com

References

Wang, Shixiang, et al. "The predictive power of tumor mutational burden in lung cancer immunotherapy response is influenced by patients' sex." International journal of cancer (2019).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
### specify hazard ratios (hr)
hr <- c(0.30, 0.11, 1.25, 0.63, 0.90, 0.28)
### specify lower bound for hr confidence intervals
ci.lb <- c(0.09, 0.02, 0.82, 0.42, 0.41, 0.12)
### specify upper bound for hr confidence intervals
ci.ub <- c(1.00, 0.56, 1.90, 0.95, 1.99, 0.67)
### specify sample number
ni <- c(16L, 18L, 118L, 122L, 37L, 38L)
### trials
trial <- c(
  "Rizvi 2015", "Rizvi 2015",
  "Rizvi 2018", "Rizvi 2018",
  "Hellmann 2018", "Hellmann 2018"
)
### subgroups
subgroup <- rep(c("Male", "Female"), 3)

entry <- paste(trial, subgroup, sep = "-")
### combine as data.frame

wang2019 <-
  data.frame(
    entry = entry,
    trial = trial,
    subgroup = subgroup,
    hr = hr,
    ci.lb = ci.lb,
    ci.ub = ci.ub,
    ni = ni,
    stringsAsFactors = FALSE
  )

deft_prepare(wang2019)

metawho documentation built on Dec. 6, 2019, 5:09 p.m.