Title: | Meta-Analytical Implementation to Identify Who Benefits Most from Treatments |
---|---|
Description: | A tool for implementing so called 'deft' approach (see Fisher, David J., et al. (2017) <DOI:10.1136/bmj.j573>) and model visualization. |
Authors: | Shixiang Wang [aut, cre] |
Maintainer: | Shixiang Wang <[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2024-11-23 04:18:32 UTC |
Source: | https://github.com/ShixiangWang/metawho |
'deft' method is a meta-analytical approach to pool conclusion from multiple studies. More details please see references.
deft_do(prepare, group_level, method = "FE")
deft_do(prepare, group_level, method = "FE")
prepare |
a result |
group_level |
level of subgroup, should be a character vector with
length 2 and the reference should put in the first. For example, if you
have 'Male' and 'Female' groups and want compare 'Female' with 'Male', then
should set |
method |
character string specifying whether a fixed- or a random/mixed-effects model should be fitted. A fixed-effects model (with or without moderators) is fitted when using |
About model fit, please see metafor::rma()
.
a list
which class is 'deft'.
Shixiang Wang [email protected]
Fisher, David J., et al. "Meta-analytical methods to identify who benefits most from treatments: daft, deluded, or deft approach?." bmj 356 (2017): j573.
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).
data("wang2019") deft_do(wang2019, group_level = c("Male", "Female"))
data("wang2019") deft_do(wang2019, group_level = c("Male", "Female"))
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)
deft_prepare(data, conf_level = 0.05)
data |
a |
conf_level |
a number specify confidence level, default is 0.05. |
a data.frame
Shixiang Wang [email protected]
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).
### 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)
### 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)
Show deft result
deft_show( deft, element, study_labels = NULL, headings = list(study = ifelse(element == "all", "Study-subgroup", "Study"), n = "N", measure = NULL, ci = "HR (95% CI)"), trans = base::exp, show_model = ifelse(element == "all", FALSE, TRUE), show_stats = list(`I^2` = rlang::quo(sprintf("%0.1f%%", I2)), p = rlang::quo(format.pval(QEp, digits = 2))), ... )
deft_show( deft, element, study_labels = NULL, headings = list(study = ifelse(element == "all", "Study-subgroup", "Study"), n = "N", measure = NULL, ci = "HR (95% CI)"), trans = base::exp, show_model = ifelse(element == "all", FALSE, TRUE), show_stats = list(`I^2` = rlang::quo(sprintf("%0.1f%%", I2)), p = rlang::quo(format.pval(QEp, digits = 2))), ... )
deft |
result from deft_do. |
element |
'all' or 'subgroup'. |
study_labels |
labels for studies. |
headings |
a list for controlling plot headings. |
trans |
an optional transform function used on the numeric data for plotting the axes |
show_model |
a logical value, if |
show_stats |
a |
... |
other arguments except 'panels', 'trans', 'study_labels',
and 'show_stats' passed to |
a ggplot
object
ShixiangWang [email protected]
data("wang2019") res <- deft_do(wang2019, group_level = c("Male", "Female")) p1 <- deft_show(res, "all") p1 p2 <- deft_show(res, "subgroup") p2
data("wang2019") res <- deft_do(wang2019, group_level = c("Male", "Female")) p1 <- deft_show(res, "all") p1 p2 <- deft_show(res, "subgroup") p2
Hazard ratio (HR) for disease progression analysis comparing TMB-high with TMB-low in three NSCLC datasets
a data.frame
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).
data("wang2019")
data("wang2019")