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.

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

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

### 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)
#> entry trial subgroup hr ci.lb ci.ub ni conf_q #> 1 Rizvi 2015-Male Rizvi 2015 Male 0.30 0.09 1.00 16 1.959964 #> 2 Rizvi 2015-Female Rizvi 2015 Female 0.11 0.02 0.56 18 1.959964 #> 3 Rizvi 2018-Male Rizvi 2018 Male 1.25 0.82 1.90 118 1.959964 #> 4 Rizvi 2018-Female Rizvi 2018 Female 0.63 0.42 0.95 122 1.959964 #> 5 Hellmann 2018-Male Hellmann 2018 Male 0.90 0.41 1.99 37 1.959964 #> 6 Hellmann 2018-Female Hellmann 2018 Female 0.28 0.12 0.67 38 1.959964 #> yi sei #> 1 -1.2039728 0.6142831 #> 2 -2.2072749 0.8500678 #> 3 0.2231436 0.2143674 #> 4 -0.4620355 0.2082200 #> 5 -0.1053605 0.4030005 #> 6 -1.2729657 0.4387290