knitr::opts_chunk$set(
  message = FALSE,
  echo = FALSE)

next actions

goals

# find the combinations
tar_load(oti_results)
library(adpain)

comp <- 
oti_results %>% 
  filter(intervention == "duloxetine", 
         model_type == "smd"
         ) %>%
  mutate(dir = map_chr(outcome, outcome_dir)) %>% 
  count(outcome, dir) %>% 
  group_by(dir) %>% 
  slice(1) %>% 
  select(-n) %>% 
  ungroup()

pick a subgroup to analyse and compare results

smd: lower is better dataset

tar_load(oti_pw)

lower_example <- 
comp %>% 
  filter(dir == "lower") %>% 
  left_join(oti_pw) %>% 
  filter(intervention == "duloxetine",
         timepoint == "post_int") 

meta-analysis results

lower_example$pw_rma[[1]]$rma %>% forest()

lower_example$pw_rma[[1]]$rma

nma estimates

lower_example %>% 
  select(contains("nma"))

mean difference estimates

lower_md <- 
escalc(m1i = mean, 
       m2i = mean_control, 
       sd1i = sd, 
       sd2i = sd_control, 
         n1i = n, n2i = n_control, data = lower_example$pw_dat, measure = "MD", slab = study) %>% 
  rma(measure = "MD", data = ., yi = yi, vi = vi, slab = study) 

lower_md %>% forest()

lower_md 

arm-based nma

contrast nma

higher example

higher_example <- 
comp %>% 
  filter(dir == "higher") %>% 
  left_join(oti_pw) %>% 
  filter(intervention == "duloxetine",
         timepoint == "post_int") 

meta-analysis results

higher_example$pw_rma[[1]]$rma %>% forest()

higher_example$pw_rma[[1]]$rma

nma estimates

higher_example %>% 
  select(contains("nma"))

mean difference estimates

higher_md <- 
escalc(m1i = mean, 
       m2i = mean_control, 
       sd1i = sd, 
       sd2i = sd_control, 
         n1i = n, n2i = n_control, data = higher_example$pw_dat, measure = "MD", slab = study) %>% 
  rma(measure = "MD", data = ., yi = yi, vi = vi, slab = study) 

higher_md %>% forest()


softloud/adpain documentation built on Feb. 14, 2022, 5:58 p.m.