From ec5e78df126a1b5872a10a9a2a4036e962549bc4 Mon Sep 17 00:00:00 2001
From: Christian Roever <christian.roever@med.uni-goettingen.de>
Date: Mon, 21 Feb 2022 12:27:26 +0100
Subject: [PATCH] added baseline data to Karner (2014) example

---
 DESCRIPTION              |  2 +-
 data/KarnerEtAl2014.R    | 13 ++++++++++
 man/KarnerEtAl2014.Rd    | 51 ++++++++++++++++++++++++++--------------
 man/bayesmeta-package.Rd |  2 +-
 4 files changed, 49 insertions(+), 19 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 605bb35..a1f8306 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,7 +2,7 @@ Package: bayesmeta
 Type: Package
 Title: Bayesian Random-Effects Meta-Analysis and Meta-Regression
 Version: 2.8
-Date: 2022-02-18
+Date: 2022-02-21
 Authors@R: c(person(given="Christian", family="Roever", role=c("aut","cre"), 
                     email="christian.roever@med.uni-goettingen.de",
                     comment=c(ORCID="0000-0002-6911-698X")),
diff --git a/data/KarnerEtAl2014.R b/data/KarnerEtAl2014.R
index 2fbad20..343f7b0 100644
--- a/data/KarnerEtAl2014.R
+++ b/data/KarnerEtAl2014.R
@@ -32,6 +32,19 @@ KarnerEtAl2014 <- cbind.data.frame("study" = c("Bateman2010a", "Bateman2010b", "
                                                                                     1,1,1,1,1,1,1,1,
                                                                                     1,1,1,1,1,2)]),
                                    ###################
+                                   "baseline.age"       = c(65, 65, 62, 64,  65, 67, 65, 65,  65, 65, 62, 60,
+                                                            64, 63, 68, 66,  62, 65, 64, 62,  60, 64),
+                                   "baseline.males"     = c(0.78, 0.74, 0.76, 0.77,  0.64, 0.60, 0.77, NA,
+                                                            0.88, NA, NA, 0.61,  0.95, 0.78, 0.98, NA,
+                                                            NA, 0.75, 0.86, 0.69,  0.94, 0.70),
+                                   "baseline.fev1"      = c(1.10, 1.06, 1.30, 1.10,  1.00, 0.97, 1.10, 1.00,
+                                                            1.40, 1.30, 2.10, 1.50,  1.20, 1.30, 1.00, 1.30,
+                                                            1.30, 1.10, 1.40, 2.00,  1.10, 1.10),
+                                   "baseline.fev1pp"    = c(40, 38, 45, 39,  39, 39, 38, 39,  48, 49, 73, 53,
+                                                            NA, 46, 36, 50,  47, 39, 44, 66,  35, 52),
+                                   "baseline.pyr"       = c(45, 48, 36, 43,  NA, 51, 52, 66,  43, 37, 31, 34,
+                                                            NA, NA, 68, 55,  NA, 49, 44, NA,  44, 52),
+                                   ###################
                                    "tiotropium.total"   = c(1989, 1337, 1236, 402, 550, 608, 260, 100, 500, 200,
                                                             107, 228, 147, 123, 914, 69, 30, 2987, 266, 238,
                                                             46, 360),
diff --git a/man/KarnerEtAl2014.Rd b/man/KarnerEtAl2014.Rd
index 33f6e19..3030088 100644
--- a/man/KarnerEtAl2014.Rd
+++ b/man/KarnerEtAl2014.Rd
@@ -10,20 +10,25 @@
     \bold{year}               \tab \code{numeric}   \tab publication year \cr
     \bold{duration}           \tab \code{factor}    \tab study duration (\eqn{<1} year vs. \eqn{\geq 1}{>=1} year) \cr
     \bold{inhaler}            \tab \code{factor}    \tab type of inhaler investigated (\dQuote{dry powder} or \dQuote{soft mist}) \cr
-    \bold{tiotropium.total}   \tab \code{numeric}    \tab total number of patients in the treatment group\cr
-    \bold{tiotropium.exa}     \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} exacerbation in the treatment group \cr
-    \bold{tiotropium.sexa}    \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} \emph{severe} exacerbation in the treatment group \cr
-    \bold{tiotropium.hospi}   \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} hospitalisation (all-cause) in the treatment group \cr
-    \bold{tiotropium.deaths}  \tab \code{numeric}    \tab number of deaths in the treatment group\cr
-    \bold{tiotropium.sae}     \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} serious adverse event (non-fatal) in the treatment group \cr
-    \bold{tiotropium.dropout} \tab \code{numeric}    \tab number of withdrawals in the treatment group \cr
-    \bold{placebo.total}      \tab \code{numeric}    \tab total number of patients in the control group \cr
-    \bold{placebo.exa}        \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} exacerbation in the control group \cr
-    \bold{placebo.sexa}       \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} \emph{severe} exacerbation in the control group \cr
-    \bold{placebo.hospi}      \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} hospitalisation (all-cause) in the control group \cr
-    \bold{placebo.deaths}     \tab \code{numeric}    \tab number of deaths in the control group\cr
-    \bold{placebo.sae}        \tab \code{numeric}    \tab number of patients with \eqn{\geq 1}{>=1} serious adverse event (non-fatal) in the control group \cr
-    \bold{placebo.dropout}    \tab \code{numeric}    \tab number of withdrawals in the control group \cr
+    \bold{baseline.age}       \tab \code{numeric}   \tab mean age at baseline \cr
+    \bold{baseline.males}     \tab \code{numeric}   \tab proportion of males among study participants \cr
+    \bold{baseline.fev1}      \tab \code{numeric}   \tab mean FEV1 at baseline \cr
+    \bold{baseline.fev1pp}    \tab \code{numeric}   \tab mean FEV1 (percent of predicted) at baseline \cr
+    \bold{baseline.pyr}       \tab \code{numeric}   \tab mean number of pack-years (smoking history) \cr
+    \bold{tiotropium.total}   \tab \code{numeric}   \tab total number of patients in the treatment group \cr
+    \bold{tiotropium.exa}     \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} exacerbation in the treatment group \cr
+    \bold{tiotropium.sexa}    \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} \emph{severe} exacerbation in the treatment group \cr
+    \bold{tiotropium.hospi}   \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} hospitalisation (all-cause) in the treatment group \cr
+    \bold{tiotropium.deaths}  \tab \code{numeric}   \tab number of deaths in the treatment group\cr
+    \bold{tiotropium.sae}     \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} serious adverse event (non-fatal) in the treatment group \cr
+    \bold{tiotropium.dropout} \tab \code{numeric}   \tab number of withdrawals in the treatment group \cr
+    \bold{placebo.total}      \tab \code{numeric}   \tab total number of patients in the control group \cr
+    \bold{placebo.exa}        \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} exacerbation in the control group \cr
+    \bold{placebo.sexa}       \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} \emph{severe} exacerbation in the control group \cr
+    \bold{placebo.hospi}      \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} hospitalisation (all-cause) in the control group \cr
+    \bold{placebo.deaths}     \tab \code{numeric}   \tab number of deaths in the control group\cr
+    \bold{placebo.sae}        \tab \code{numeric}   \tab number of patients with \eqn{\geq 1}{>=1} serious adverse event (non-fatal) in the control group \cr
+    \bold{placebo.dropout}    \tab \code{numeric}   \tab number of withdrawals in the control group \cr
     \bold{sgrq.md}, \bold{sgrq.se} \tab \code{numeric} \tab mean difference and associated standard error for \emph{St. George's respiratory questionnaire (SGRQ)} total score \cr
     \bold{fev1.md}, \bold{fev1.se} \tab \code{numeric} \tab mean difference and associated standard error for \emph{forced expiratory volume in 1 second (FEV1)} \cr
   }
@@ -33,13 +38,15 @@
   phases. Various treatment options are available, aimed at both
   providing relief during an acute exacerbation, and at delaying overall
   disease progression. A common drug used in the management of COPD is
-  \emph{tiotropium}, which is administered via an inhaler device. Karner
-  \emph{et al.} (2014) conducted a systematic review in order to
+  \emph{tiotropium}, which is administered via an inhaler device.
+
+  Karner \emph{et al.} (2014) conducted a systematic review in order to
   evaluate the evidence on the effects of tiotropium in comparison to
   placebo. 22 placebo-controlled studies were found, and a range of
   endpoints and subgroups were considered. The data reproduced here
   relate to analyses 1.1, 1.9, 1.14, 1.15, 1.19, 1.26, 1.27 and 1.28 in
-  the original investigation.
+  the original investigation. A number of study-level covariables are
+  also provided.
 }
 \source{C. Karner, J. Chong, P. Poole.
   Tiotropium versus placebo for chronic obstructive pulmonary disease.
@@ -59,6 +66,16 @@ karner.exa <- escalc(measure="OR",
 forestplot(karner.exa, title="exacerbation",
            exponentiate=TRUE, xlog=TRUE,
            xlab="odds ratio")
+
+# derive St. George's Respiratory Questionnaire (SGRQ) effect sizes:
+karner.sgrq <- escalc(measure="MD",
+                      yi=sgrq.md, sei=sgrq.se,
+                      slab=study, data=KarnerEtAl2014,
+                      subset=is.finite(KarnerEtAl2014$sgrq.md))
+# show forest plot:
+forestplot(karner.sgrq, title="SGRQ",
+           xlab="mean difference")
+
 }
 }
 \keyword{datasets}
diff --git a/man/bayesmeta-package.Rd b/man/bayesmeta-package.Rd
index d1f5f5e..b39c7df 100644
--- a/man/bayesmeta-package.Rd
+++ b/man/bayesmeta-package.Rd
@@ -17,7 +17,7 @@
     Package: \tab bayesmeta\cr
     Type:    \tab Package\cr
     Version: \tab 2.8\cr
-    Date:    \tab 2022-02-18\cr
+    Date:    \tab 2022-02-21\cr
     License: \tab GPL (>=2)
   }
   The main functionality is provided by the \code{\link{bayesmeta}()}
-- 
GitLab