trans.armdata: Transforming contrast-based summary statistics to arm-based...

View source: R/trans.armdata.r

trans.armdataR Documentation

Transforming contrast-based summary statistics to arm-based data

Description

The multivariate meta-analysis and meta-regression models used in NMA package require contrast-based summary statistics created by setup function. The setup function requires arm-based data for individual studies. Some studies only report summary statistics (e.g., hazard ratio estimates) and do not provide arm-level data. The trans.armdata function creates arm-level data that can be used for the setup function using the summary statistics. Note the estimated data may not accord to the original data. However, they are solely pseudo-data, designed so that the contrast-based statistics generated by the setup function accord to the original data. The NMA package tools rely solely on summary statistics for the synthesis analyses, so this is not problematic. If there are relevant covariate data that can used for meta-regression analyses, please edit the output object before entering to the setup function; the output object can be exported to a CSV or Microsoft Excel file. Also, when some studies report only arm-level data, users can combine the data object of arm-based data with the output object of trans.armdata function. For hazard ratio estimates, the event number is inversely calculated using the complementary log-log-type estimator.

Usage

trans.armdata(study,treat1,treat2,n1,n2,y,SE,measure,data)

Arguments

study

Study ID

treat1

Treatment variable of arm 1. It can be formed as both of numbered treatment (=1,2,...) and characters (e.g., "Placebo", "ARB", "Beta blocker").

treat2

Treatment variable of arm 2. It can be formed as both of numbered treatment (=1,2,...) and characters (e.g., "Placebo", "ARB", "Beta blocker").

n1

Sample size of arm 1.

n2

Sample size of arm 2.

y

Contrast-based summary statistics (e.g., estimate of logHR between arms 1 and 2).

SE

Standard error estimate of y.

measure

Outcome measure (can be logOR (log odds ratio), logRR (log risk ratio), and RD (risk difference) for dichotomous outcome, MD (mean difference) for continuous outcome, and logHR (log hazard ratio) for survival outcome.

data

A data frame that involves the contrast-based data.

Value

Estimated arm-based summary statistics are generated. Note the estimated data may not accord to the original data. However, they are solely pseudo-data, designed so that the contrast-based statistics generated by the setup function accord to the original data. The NMA package tools rely solely on summary statistics for the synthesis analyses, so this is not problematic.

  • study: The ID variable that specifies studies.

  • trt: A variable that specifies treatment categories.

  • d: The estimated number of events (possibly pseudo-data; for dichotomous and survival outcomes).

  • n: The sample sizes.

  • m: The estimated means (possibly pseudo-data; for continuous outcomes).

  • s: The estimated SDs (possibly pseudo-data; for continuous outcomes).

References

Noma, H. and Maruo, K. (2025). Network meta-analysis combining survival and count outcome data: A simple frequentist approach. medRxiv, \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1101/2025.01.23.25321051")}.

Examples

data(exdataMD)
trans.armdata(study=id,treat1=treat1,treat2=treat2,n1=n1,n2=n2,y=MD,SE=seMD,
measure="MD",data=exdataMD)

data(exdataRR)
trans.armdata(study=id,treat1=treat1,treat2=treat2,n1=n1,n2=n2,y=logRR,SE=SE,
measure="logRR",data=exdataRR)

data(woods1)
trans.armdata(study=studlab,treat1=treat1,treat2=treat2,n1=n1,n2=n2,y=TE,SE=seTE,
measure="logHR",data=woods1)
# Event numbers are invesely calculated by the hazard ratio estimates.
# The resultant event numbers can differ from the actual event numbers,
# but they can be interpreted as pseudo-data that have equivalent information
# with the hazard ratio estimates.
# The hazard ratio estimates can be re-calculated by setup function.

NMA documentation built on Nov. 5, 2025, 7:15 p.m.