Package 'metawho'

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-08-25 04:41:04 UTC
Source: https://github.com/ShixiangWang/metawho

Help Index


Implement deft method

Description

'deft' method is a meta-analytical approach to pool conclusion from multiple studies. More details please see references.

Usage

deft_do(prepare, group_level, method = "FE")

Arguments

prepare

a result data.frame from deft_prepare function or a data.frame contains at least 'trial', 'subgroup', 'yi' and 'sei' these four columns.

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 c('Male', 'Female').

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 method="FE". Random/mixed-effects models are fitted by setting method equal to one of the following: "DL", "HE", "SJ", "ML", "REML", "EB", "HS", or "GENQ". Default is "REML". See ‘Details’.

Details

About model fit, please see metafor::rma().

Value

a list which class is 'deft'.

Author(s)

Shixiang Wang [email protected]

References

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).

Examples

data("wang2019")
deft_do(wang2019, group_level = c("Male", "Female"))

Prepare log transformation data for effect size estimation according to confidence level and distribution

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

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 [email protected]

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)

Show deft result

Description

Show deft result

Usage

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))),
  ...
)

Arguments

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 TRUE, show model result, otherwise only show forest plots for studies

show_stats

a list of stats to show at the bottom of the forest plot for e.g. heterogeneity

...

other arguments except 'panels', 'trans', 'study_labels', and 'show_stats' passed to forestmodel::forest_rma().

Value

a ggplot object

Author(s)

ShixiangWang [email protected]

Examples

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

Description

Hazard ratio (HR) for disease progression analysis comparing TMB-high with TMB-low in three NSCLC datasets

Format

a data.frame

Source

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

data("wang2019")