### Install netmeta from GitHub (develop branch) Source: https://github.com/guido-s/netmeta/blob/develop/README.md Install the development version of the netmeta package directly from GitHub. Ensure the 'remotes' package is installed first. Set 'build_vignettes = TRUE' to build package vignettes. ```r install.packages("remotes") remotes::install_github("guido-s/netmeta", ref = "develop", build_vignettes = TRUE) ``` -------------------------------- ### Install netmeta from CRAN Source: https://github.com/guido-s/netmeta/blob/develop/README.md Use this command to install the latest stable release of the netmeta package from the Comprehensive R Archive Network (CRAN). ```r install.packages("netmeta") ``` -------------------------------- ### Manage Global netmeta Package Settings Source: https://context7.com/guido-s/netmeta/llms.txt Gets or sets global default settings for netmeta functions. Use `settings.netmeta()` to view defaults, specify new settings to change them, and `reset = TRUE` to restore original defaults. ```r # View all current defaults settings.netmeta() # Change defaults: use REML for tau, random effects only settings.netmeta(method.tau = "REML", common = FALSE, random = TRUE) # Restore original defaults settings.netmeta(reset = TRUE) ``` -------------------------------- ### settings.netmeta() — Global package settings Source: https://context7.com/guido-s/netmeta/llms.txt Gets or sets global defaults for all netmeta functions (e.g., default method.tau, common, random, level.ma), equivalent to gs() / cilevel() in the companion meta package. ```APIDOC ## settings.netmeta() — Global package settings ### Description Gets or sets global defaults for all **netmeta** functions (e.g., default `method.tau`, `common`, `random`, `level.ma`), equivalent to `gs()` / `cilevel()` in the companion **meta** package. ### Example ```r # View all current defaults settings.netmeta() # Change defaults: use REML for tau, random effects only settings.netmeta(method.tau = "REML", common = FALSE, random = TRUE) # Restore original defaults settings.netmeta(reset = TRUE) ``` ``` -------------------------------- ### Get netmeta citation Source: https://github.com/guido-s/netmeta/blob/develop/README.md Retrieve the citation information for the netmeta R package in a format suitable for academic papers, particularly for LaTeX users. ```r citation(package = "netmeta") ``` -------------------------------- ### Create League Tables with `netleague()` Source: https://context7.com/guido-s/netmeta/llms.txt Creates a league table of all pairwise NMA estimates. The lower triangle shows network estimates, and the upper triangle shows direct estimates or results from a second NMA object. Can export to Excel. ```r data(Senn2013) pw2 <- pairwise(studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD")) nma2 <- netmeta(pw2, common = FALSE, reference.group = "plac") nma2_common <- netmeta(pw2, random = FALSE, reference.group = "plac") # Single NMA: lower triangle = network estimates, upper = direct estimates lt <- netleague(nma2, digits = 2, bracket = "(", separator = " to ") print(lt) # Two NMA objects: compare random vs common effects lt2 <- netleague(nma2, nma2_common, digits = 2) print(lt2) # Export to Excel netleague(nma2, digits = 2, writexl = TRUE, path = "league_table.xlsx") ``` -------------------------------- ### netleague() Source: https://context7.com/guido-s/netmeta/llms.txt Creates a square league table that displays all pairwise NMA estimates along with their confidence intervals. The table can differentiate between network estimates (lower triangle) and direct estimates (upper triangle) or compare two different NMA objects. It also supports exporting to Excel. ```APIDOC ## `netleague()` — League table of all pairwise comparisons Creates a square league table showing all pairwise NMA estimates (with CIs). The lower triangle contains network estimates; the upper triangle contains direct estimates (or results from a second NMA object for comparison). Can export to Excel. ```r data(Senn2013) pw2 <- pairwise(studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD")) nma2 <- netmeta(pw2, common = FALSE, reference.group = "plac") nma2_common <- netmeta(pw2, random = FALSE, reference.group = "plac") # Single NMA: lower triangle = network estimates, upper = direct estimates lt <- netleague(nma2, digits = 2, bracket = "(", separator = " to ") print(lt) # Two NMA objects: compare random vs common effects lt2 <- netleague(nma2, nma2_common, digits = 2) print(lt2) # Export to Excel netleague(nma2, digits = 2, writexl = TRUE, path = "league_table.xlsx") ``` ``` -------------------------------- ### Plot Direct vs Indirect Estimates from Netsplit Source: https://context7.com/guido-s/netmeta/llms.txt Visualizes the comparison between direct and indirect estimates for each treatment comparison. Requires the 'netmeta' package and a 'netsplit' object. ```R plot(split2, pooled = "random") ``` -------------------------------- ### Basic Forest Plot of NMA Results Source: https://context7.com/guido-s/netmeta/llms.txt Creates a basic forest plot comparing all treatments against a reference group. Requires the 'netmeta' package and prior creation of a 'netmeta' object. ```R data(Senn2013) pw2 <- pairwise(studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD")) nma2 <- netmeta(pw2, common = FALSE, reference.group = "plac") # Basic forest plot versus placebo forest(nma2, reference.group = "plac", xlim = c(-1.5, 1), xlab = "HbA1c difference vs placebo") ``` -------------------------------- ### Highlight a Specific Comparison in Network Graph Source: https://context7.com/guido-s/netmeta/llms.txt Highlights a specific comparison (e.g., '1:4') in the network graph with a specified color and scale. Requires the 'netmeta' package. ```R netgraph(nma1, labels = tnames, highlight = "1:4", col.highlight = "red", scale.highlight = 3) ``` -------------------------------- ### Component Network Meta-Analysis with `netcomb()` Source: https://context7.com/guido-s/netmeta/llms.txt Extends NMA to treatment combinations using an additive model, assuming the effect of a combination is the sum of its components. Useful when treatments share components. ```r data(Linde2016) # Keep only a few studies for illustration face <- subset(Linde2016, id %in% c(16, 24, 49, 118)) pw <- pairwise(treat = list(treatment1, treatment2, treatment3), event = list(resp1, resp2, resp3), n = list(n1, n2, n3), studlab = id, data = face, sm = "OR") nma <- netmeta(pw, common = FALSE) # Additive component NMA: separator "+" between components cnma <- netcomb(nma, inactive = "Placebo") print(cnma) forest(cnma) ``` -------------------------------- ### Basic Network Graph Visualization Source: https://context7.com/guido-s/netmeta/llms.txt Generates a basic circular network graph visualization for a network meta-analysis object. Nodes represent treatments, and edges represent direct comparisons. ```r data(smokingcessation) pw1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") nma1 <- netmeta(pw1, common = FALSE) # Basic circular graph netgraph(nma1) ``` -------------------------------- ### forest() / forest.netmeta() Source: https://context7.com/guido-s/netmeta/llms.txt Produces a forest plot comparing all treatments against a reference, with optional additional columns such as P-scores, number of direct comparisons, or custom statistics. Sorting and column customisation are supported. ```APIDOC ## forest() / forest.netmeta() ### Description Produces a forest plot comparing all treatments against a reference, with optional additional columns such as P-scores, number of direct comparisons, or custom statistics. Sorting and column customisation are supported. ### Method ```r forest(nma, reference.group, xlim, xlab, rightcols, just.addcols, sortvar, leftcols, leftlabs, smlab) ``` ### Parameters #### Arguments - `nma`: A `netmeta` object. - `reference.group`: The reference group for comparison. - `xlim`: Limits for the x-axis. - `xlab`: Label for the x-axis. - `rightcols`: Additional columns to display on the right (e.g., "effect", "ci", "Pscore"). - `just.addcols`: Justification for additional columns ("right" or "left"). - `sortvar`: Variable to sort the plot by (e.g., `-Pscore`, `-k`). - `leftcols`: Columns to display on the left (e.g., "studlab", "k"). - `leftlabs`: Labels for the left columns. - `smlab`: Label for the summary measure. ### Request Example ```r # Basic forest plot versus placebo forest(nma2, reference.group = "plac", xlim = c(-1.5, 1), xlab = "HbA1c difference vs placebo") # Add P-Scores column and sort by descending P-Score forest(nma2, reference.group = "plac", xlim = c(-1.5, 1), xlab = "HbA1c difference vs placebo", rightcols = c("effect", "ci", "Pscore"), just.addcols = "right", sortvar = -Pscore) # Show number of direct comparisons forest(nma2, reference.group = "plac", leftcols = c("studlab", "k"), leftlabs = c("Contrast to placebo", "Direct studies"), sortvar = -k, smlab = "Random Effects Model") ``` ``` -------------------------------- ### netsplit() Source: https://context7.com/guido-s/netmeta/llms.txt Decomposes each network estimate into the direct and indirect evidence components and provides a statistical test of consistency (node-splitting / back-calculation). Prints the direct evidence proportion, the separate estimates, and a p-value for inconsistency between direct and indirect evidence. ```APIDOC ## netsplit() ### Description Decomposes each network estimate into the direct and indirect evidence components and provides a statistical test of consistency (node-splitting / back-calculation). Prints the direct evidence proportion, the separate estimates, and a p-value for inconsistency between direct and indirect evidence. ### Method ```r netsplit(nma, ..., digits, show) ``` ### Parameters #### Arguments - `nma`: A `netmeta` object. - `...`: Additional arguments passed to other methods. - `digits`: Number of digits to display. - `show`: What to display (e.g., "with.direct"). ### Request Example ```r # Back-calculation method (default) split2 <- netsplit(nma2) print(split2, digits = 2, show = "with.direct") # Plot direct vs indirect estimates plot(split2, pooled = "random") ``` ``` -------------------------------- ### Visualize Network Graph with Study Counts Source: https://context7.com/guido-s/netmeta/llms.txt Generates a network graph where edge thickness is proportional to precision and displays the number of studies on edges. Requires the 'netmeta' package. ```R tnames <- c("No intervention", "Self-help", "Individual counselling", "Group counselling") netgraph(nma1, labels = tnames, points = TRUE, cex.points = 3, cex = 1.2, thickness = "se.common", # thicker = more precise number.of.studies = TRUE, col = "darkblue") ``` -------------------------------- ### netbind() — Combine multiple NMA objects for a joint forest plot Source: https://context7.com/guido-s/netmeta/llms.txt Combines several netmeta objects (e.g., from different outcomes or time points) so that a single multi-panel forest plot can be produced for comparison. ```APIDOC ## netbind() — Combine multiple NMA objects for a joint forest plot ### Description Combines several `netmeta` objects (e.g., from different outcomes or time points) so that a single multi-panel forest plot can be produced for comparison. ### Example ```r data(Linde2016) face <- subset(Linde2016, id %in% c(16, 24, 49, 118)) pw_resp <- pairwise(treat = list(treatment1, treatment2, treatment3), event = list(resp1, resp2, resp3), n = list(n1, n2, n3), studlab = id, data = face, sm = "OR") pw_remi <- pairwise(treat = list(treatment1, treatment2, treatment3), event = list(remi1, remi2, remi3), n = list(n1, n2, n3), studlab = id, data = face, sm = "OR") nma_resp <- netmeta(pw_resp, common = FALSE, ref = "Placebo") nma_remi <- netmeta(pw_remi, common = FALSE, ref = "Placebo") b <- netbind(nma_resp, nma_remi, name = c("Response", "Remission"), random = TRUE) forest(nb, col.study = c("darkgreen", "darkblue")) ``` ``` -------------------------------- ### Check Network Connectivity with netconnection() Source: https://context7.com/guido-s/netmeta/llms.txt Checks if a network is fully connected and identifies sub-networks. Useful as a pre-check before fitting a network meta-analysis model. Requires treatment and study labels. ```r # Deliberately disconnected network treat1 <- c("A", "A", "C") treat2 <- c("B", "B", "D") studlab <- c("s1", "s2", "s3") nc <- netconnection(treat1, treat2, studlab) nc$n.subnets # 2 — network is disconnected summary(nc) # shows sub-networks ``` -------------------------------- ### Subgroup Network Meta-Analysis with `subgroup.netmeta()` Source: https://context7.com/guido-s/netmeta/llms.txt Performs subgroup NMA by splitting the network based on a covariate, fitting separate NMAs within each subgroup, and comparing results. Requires a subgroup variable to be defined. ```r data(Senn2013) pw2 <- pairwise(studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD")) nma2 <- netmeta(pw2, common = FALSE, reference.group = "plac") # Subgroup by a binary covariate (e.g., study quality flag) # Here we create a dummy subgroup for illustration set.seed(1); grp <- sample(c("high", "low"), nma2$k, replace = TRUE) sg <- subgroup.netmeta(nma2, subgroup = grp) print(sg) ``` -------------------------------- ### Compute Contribution Matrix with `netcontrib()` Source: https://context7.com/guido-s/netmeta/llms.txt Computes the contribution matrix showing how much each direct pairwise comparison contributes to each network estimate. Supports various methods like shortest-path and pseudoinverse. ```r data(smokingcessation) pw1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") nma1 <- netmeta(pw1) nc <- netcontrib(nma1, method = "shortestpath") print(nc, digits = 2) # Rows = network estimates; columns = direct comparisons # Values = % contribution ``` -------------------------------- ### Split Network Estimates into Direct and Indirect Evidence Source: https://context7.com/guido-s/netmeta/llms.txt Decomposes network estimates into direct and indirect evidence components and tests for consistency. Requires the 'netmeta' package. ```R data(Senn2013) pw2 <- pairwise(studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD")) nma2 <- netmeta(pw2, common = FALSE, reference.group = "plac") # Back-calculation method (default) split2 <- netsplit(nma2) print(split2, digits = 2, show = "with.direct") #> Displays: NMA estimate, direct estimate, indirect estimate, z, p-value ``` -------------------------------- ### Fit Network Meta-Regression with Continuous Covariate Source: https://context7.com/guido-s/netmeta/llms.txt Fits a network meta-regression model using a continuous covariate. Requires pre-existing netmeta object and covariate data. ```r data(Senn2013) pw2 <- pairwise(studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD")) nma2 <- netmeta(pw2, common = FALSE, reference.group = "plac") # Continuous covariate: mean baseline HbA1c # (illustrative; attach covariate to the pairwise data) covar <- c(8.5, 8.1, 9.2, 7.8, 8.9, 8.4, 9.0, 7.5, 8.7, 8.3, 8.6, 8.2, 9.1, 7.9, 8.8)[seq_len(nma2$k)] nmr <- netmetareg(nma2, covar = covar) summary(nmr) ``` -------------------------------- ### Report netmeta bugs Source: https://github.com/guido-s/netmeta/blob/develop/README.md Use this R command to open a bug report for the netmeta package. Note that this command is not supported in RStudio. ```r bug.report(package = "netmeta") ``` -------------------------------- ### netconnection() — Check network connectivity Source: https://context7.com/guido-s/netmeta/llms.txt Checks whether a proposed network is fully connected, and if not, identifies sub-networks. Useful as a pre-check before calling netmeta(). ```APIDOC ## netconnection() — Check network connectivity ### Description Checks whether a proposed network is fully connected, and if not, identifies sub-networks. Useful as a pre-check before calling `netmeta()`. ### Example ```r # Deliberately disconnected network treat1 <- c("A", "A", "C") treat2 <- c("B", "B", "D") studlab <- c("s1", "s2", "s3") nc <- netconnection(treat1, treat2, studlab) nc$n.subnets # 2 — network is disconnected summary(nc) # shows sub-networks ``` ``` -------------------------------- ### Decompose Cochran's Q Statistic with `decomp.design()` Source: https://context7.com/guido-s/netmeta/llms.txt Decomposes the overall Q statistic into within-design heterogeneity and between-design inconsistency. Fits an extended model to identify which study designs drive inconsistency. ```r data(Senn2013) pw2 <- pairwise(studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD")) nma2 <- netmeta(pw2) dd <- decomp.design(nma2) dd$Q.decomp # overall, within-designs, between-designs Q dd$Q.het.design # within-design Q by design dd$Q.inc.detach # between-designs Q after removing each design dd$Q.inc.random # between-designs Q for random effects model ``` -------------------------------- ### `netgraph()` / `netgraph.netmeta()` — Network graph visualisation Source: https://context7.com/guido-s/netmeta/llms.txt Draws the evidence network as a graph where nodes are treatments and edges are direct comparisons. Edge widths can encode the number of studies or precision; node sizes can encode the number of participants. ```APIDOC ## `netgraph()` / `netgraph.netmeta()` — Network graph visualisation ### Description Draws the evidence network as a graph where nodes are treatments and edges are direct comparisons. Edge widths can encode the number of studies or precision; node sizes can encode the number of participants. Supports 2-D and 3-D layouts, circular or optimised positioning, and highlighting of specific comparisons or multi-arm studies. ### Method Signature ```r netgraph(x, ...) ``` ### Parameters - **x** (object) - An object of class `"netmeta"`. - **...** - Additional arguments passed to the plotting function. ### Request Example ```r data(smokingcessation) pw1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") nma1 <- netmeta(pw1, common = FALSE) # Basic circular graph netgraph(nma1) # Customised: labelled nodes, node size proportional to number of studies, # edge width proportional to number of studies netgraph(nma1, labels = TRUE, node.lty = 0, node.width = sqrt(nma1$n.treat) * 2, cex.திகள் = 0.7, col.edge = "grey", lwd = sqrt(nma1$n.comparisons) / 2) ``` ### Response Generates a plot of the evidence network. ``` -------------------------------- ### `netmeta()` — Core network meta-analysis Source: https://context7.com/guido-s/netmeta/llms.txt Fits a frequentist NMA model using the graph-theoretical/weighted least squares approach. Accepts data in contrast-based format or from a `pairwise()` object. Returns an object of class "netmeta" with pairwise treatment effects, heterogeneity statistics, and network matrices. ```APIDOC ## `netmeta()` — Core network meta-analysis ### Description Fits a frequentist NMA model using the graph-theoretical/weighted least squares approach of Rücker (2012). Accepts data in contrast-based format (treatment effect `TE` and its standard error `seTE` per comparison per study) or directly from a `pairwise()` object. Returns an object of class `"netmeta"` with all pairwise treatment effects, heterogeneity statistics, and network matrices for both common and random effects models. ### Method Signature ```r netmeta(TE, seTE, treat1, treat2, studlab, ..., data, sm, reference, common, random, tau.preset, small.values) ``` ### Parameters - **TE** (numeric vector) - Treatment effect estimates. - **seTE** (numeric vector) - Standard errors of treatment effect estimates. - **treat1** (character vector) - Labels for the first treatment in each contrast. - **treat2** (character vector) - Labels for the second treatment in each contrast. - **studlab** (character vector) - Study labels. - **data** (data.frame) - Data frame containing the data. - **sm** (character) - Scale of measurement (e.g., "OR", "MD"). - **reference** (character) - Label of the reference treatment. - **common** (logical) - Whether to fit a common effect model. - **random** (logical) - Whether to fit a random effects model. - **tau.preset** (numeric) - Preset value for between-study heterogeneity standard deviation. - **small.values** (character) - How to handle small values (e.g., "undesirable"). ### Request Example ```r library(netmeta) library(meta) # Binary outcome (smoking cessation, OR) data(smokingcessation) pw1 <- pairwise( list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR" ) nma1 <- netmeta(pw1, common = FALSE, reference = "1", small.values = "undesirable") print(nma1, digits = 2) # Continuous outcome (HbA1c in diabetes, MD) data(Senn2013) pw2 <- pairwise( studlab = study, treat = treatment, n = n, mean = mean, sd = sd, data = Senn2013, varnames = c("MD", "seMD") ) nma2 <- netmeta(pw2, common = FALSE, reference.group = "plac") summary(nma2) # Contrast-based input, preset tau nma3 <- netmeta( TE = Senn2013$MD, seTE = Senn2013$seMD, treat1 = Senn2013$treat1, treat2 = Senn2013$treat2, studlab = Senn2013$studlab, sm = "MD", tau.preset = 0.1 ) ``` ### Response An object of class `"netmeta"` containing: - **TE.random** (matrix): n×n matrix of log OR estimates (random effects). - **lower.random** (matrix): n×n lower 95% CI matrix. - **tau** (numeric): Between-study standard deviation. - **Q** (numeric): Overall Q statistic. - **I2** (numeric): I² statistic. ``` -------------------------------- ### Compute and Plot Rankogram Source: https://context7.com/guido-s/netmeta/llms.txt Computes the full ranking probability matrix (rankogram) and derives cumulative ranking curves (SUCRAs). Requires the 'netmeta' package. ```R data(smokingcessation) pw1 <- pairwise(list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR") nma1 <- netmeta(pw1, common = FALSE, small.values = "undesirable") ro <- rankogram(nma1, nsim = 1000) ro # print ranking probabilities plot(ro) # plot rankogram curves summary(ro) # SUCRA values ``` -------------------------------- ### netcomb() Source: https://context7.com/guido-s/netmeta/llms.txt Extends network meta-analysis to treatment combinations using an additive model (CNMA). This is particularly useful when treatments share components, such as in scenarios involving drug A, drug B, and their combination A+B. ```APIDOC ## `netcomb()` — Component network meta-analysis (additive model) Extends NMA to treatment combinations by assuming that the effect of a combination is the sum of its components (additive CNMA model). Useful when treatments share components (e.g., drug A, drug B, drug A+B). ```r data(Linde2016) # Keep only a few studies for illustration face <- subset(Linde2016, id %in% c(16, 24, 49, 118)) pw <- pairwise(treat = list(treatment1, treatment2, treatment3), event = list(resp1, resp2, resp3), n = list(n1, n2, n3), studlab = id, data = face, sm = "OR") nma <- netmeta(pw, common = FALSE) # Additive component NMA: separator "+" between components cnma <- netcomb(nma, inactive = "Placebo") print(cnma) forest(cnma) ``` ``` -------------------------------- ### Forest Plot Showing Direct Study Counts Source: https://context7.com/guido-s/netmeta/llms.txt Displays a forest plot with the number of direct studies for each contrast, sorted by the number of direct studies. Requires the 'netmeta' package. ```R forest(nma2, reference.group = "plac", leftcols = c("studlab", "k"), leftlabs = c("Contrast to placebo", "Direct studies"), sortvar = -k, smlab = "Random Effects Model") ``` -------------------------------- ### Fit Random Effects NMA for Binary Outcome (OR) Source: https://context7.com/guido-s/netmeta/llms.txt Fits a random effects network meta-analysis model for binary outcomes using contrast-based data. Requires the 'meta' package for pairwise analysis. The 'reference' argument specifies the treatment to be used as the reference group. ```r library(netmeta) library(meta) # --- Example 1: Binary outcome (smoking cessation, OR) --- data(smokingcessation) # Convert wide arm-based data to contrast-based format pw1 <- pairwise( list(treat1, treat2, treat3), event = list(event1, event2, event3), n = list(n1, n2, n3), data = smokingcessation, sm = "OR" ) # Fit random effects NMA; use "No intervention" as reference nma1 <- netmeta(pw1, common = FALSE, reference = "1", # treatment label "1" = No intervention small.values = "undesirable") print(nma1, digits = 2) # Key result components nma1$TE.random # n×n matrix of log OR estimates (random effects) nma1$lower.random # n×n lower 95% CI matrix nma1$tau # between-study SD nma1$Q # overall Q statistic nma1$I2 # I² ``` -------------------------------- ### Forest Plot with P-Scores and Sorting Source: https://context7.com/guido-s/netmeta/llms.txt Generates a forest plot including P-Scores as a right column and sorts the treatments by descending P-Score. Requires the 'netmeta' package. ```R forest(nma2, reference.group = "plac", xlim = c(-1.5, 1), xlab = "HbA1c difference vs placebo", rightcols = c("effect", "ci", "Pscore"), just.addcols = "right", sortvar = -Pscore) ``` -------------------------------- ### Customized Network Graph Visualization Source: https://context7.com/guido-s/netmeta/llms.txt Generates a customized network graph visualization, allowing for labeled nodes and node sizes proportional to the number of studies. Further customization options are available. ```r # Customised: labelled nodes, node size proportional to number of studies, ``` -------------------------------- ### Rank Treatments by SUCRAs Source: https://context7.com/guido-s/netmeta/llms.txt Ranks treatments using SUCRA (Surface Under the Cumulative RAnking curve) values, computed via resampling. Requires the 'netmeta' package and specification of `method = "SUCRA"` and `nsim`. ```R netrank(nma_dep, method = "SUCRA", nsim = 1000) ```