ライブラリの読み込み

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(RTSA)

データ読み込み

今回のデータセットは、RTSAで提供している”perioOxy”を使用

data("perioOxy")
perioOxy %>% head(5)
##           study  eI  eC  nI   nC
## 1 Gardella 2008  17  10  69   74
## 2    Greif 2000  13  28 250  250
## 3  Meyhoff 2009 131 141 685  701
## 4    Myles 2007  77 106 997 1015
## 5 Williams 2013  10  12  77   83

RTSAの実行

x <- RTSA(type = "analysis",
                data = perioOxy, 
                outcome = "RR",
                mc = 0.75,
                pC = 0.2,
                side = 2, 
                alpha = 0.05,
                beta = 0.1,
                fixed = FALSE, 
                es_alpha = "esOF",
                re_method = "DL",
                random_adj="D2",
                design = NULL)

結果を出力

plot(x)