setup {NMA} | R Documentation |
Transforming arm-level data to contrast-based summary statistics and making objects for network meta-analysis
Description
A setup function to generate R objects that can be used for network meta-analysis.
Users should prepare arm-level datasets, and the setup
function transforms the arm-level data to the contrast-based summary statistics.
Both of dichotomous and continuous outcomes can be treated. The type of outcome variable can be specified by the measure
. If the measure
is specified as OR
, RR
or RD
, the outcome should be dichotomous, and d
and n
are needed to compute the summary statistics.
Besides, if the measure
is specified as MD
or SMD
, the outcome should be continuous, and m
, s
and n
are needed to compute the summary statistics.
Also, if the measure
is specified as HR
, the outcome should be survival (time-to-event), and d
and n
are needed to compute the summary statistics. Note HR
corresponds to rate-ratio in ordinary sense and this option corresponds to the person-time analysis; hazard ratio accords to rate-ratio if the survival time distribution is exponential distribution.
Several covariates can be involved as z
for network meta-regression analysis (nmareg
) and transitivity analysis (transitivity
).
Usage
setup(study,trt,d,n,m,s,z,measure,ref,data)
Arguments
study |
Study ID |
trt |
Treatment variable. It can be formed as both of numbered treatment (=1,2,...) and characters (e.g., "Placebo", "ARB", "Beta blocker"). |
d |
Number of events (for dichotomous outcome and survival outcome). |
n |
Sample size (for dichotomous and continuous outcome) or total person-time at risk (for survival outcome). |
m |
Mean of the outcome variable (for continuous outcome). |
s |
Standard deviation of the outcome variable (for continuous outcome). |
z |
Covariate name vector to be used for network meta-regression analysis or transitivity analysis (optional). |
measure |
Outcome measure (can be |
ref |
Reference treatment category that should be involved in |
data |
A data frame that involves the arm-based data. |
Value
Contrast-based summary statistics are generated.
-
coding
: A table that presents the correspondence between the numerical code and treatment categories (the reference category is coded as 1). -
reference
: Reference treatment category. -
measure
: Outcome measure. -
covariate
: Covariate name(s). -
N
: The number of study. -
p
: The dimension of the contrast-based statistics. -
df
: The degree of freedom. -
study
: The ID variable that specifies studies. -
trt
: The original vector that specifies treatment categories. -
treat
: A numerical vector that specifies treatment categories based on thecoding
table. -
d
: The original vector that specifies number of events. -
n
: The original vector that specifies sample sizes. -
m
: The original vector that specifies means. -
s
: The original vector that specifies standard deviations. -
Z
: The data frame that specifies covariates matrix (design matrix). -
y
: Contrast-based summary estimates. -
S
: Vectored within-study covariance matrix.
References
Noma, H. (2023). Within-study covariance estimators for network meta-analysis with contrast-based approach. Jxiv, 490. doi:10.51094/jxiv.490.
Examples
data(heartfailure)
hf2 <- setup(study=study,trt=trt,d=d,n=n,measure="OR",ref="Placebo",data=heartfailure)
hf3 <- setup(study=study,trt=trt,d=d,n=n,measure="RR",ref="Placebo",data=heartfailure)
hf4 <- setup(study=study,trt=trt,d=d,n=n,measure="RD",ref="Placebo",data=heartfailure)
hf5 <- setup(study=study,trt=trt,d=d,n=n,z=c(SBP,DBP,pubyear),measure="OR",
ref="Placebo",data=heartfailure)
data(antidiabetic)
ad2 <- setup(study=id,trt=t,m=y,s=sd,n=n,measure="MD",ref="Placebo",data=antidiabetic)
ad3 <- setup(study=id,trt=t,m=y,s=sd,n=n,measure="SMD",ref="Placebo",data=antidiabetic)