Bayesian nodesplitting forest plot
bayes_nodesplit_plot.RdProduce a forest plot from nodesplitting results
Arguments
- nodesplit
mtc.nodesplitobject produced bybayes_nodesplit()- main_analysis
logical. Whether the analysis is the main or sensitivity analysis. Default
TRUE.- logger
Stores all notification messages to be displayed in the Log Window. Insert the logger reactive list here for running in shiny, otherwise leave the default
NULL
Value
html. Contains the svg string to generate the plot. This will display
the plot when at the end of a quarto or rmarkdown chunk. To view in the viewer
panel of Rstudio, use htmltools::browsable(). The output can be saved
using write_plot().
Examples
# \donttest{
nodesplit_path <- system.file("extdata", "continuous_nodesplit.csv", package = "metainsight")
loaded_data <- setup_load(data_path = nodesplit_path,
outcome = "continuous")
configured_data <- setup_configure(loaded_data = loaded_data,
reference_treatment = "Placebo",
effects = "random",
outcome_measure = "MD",
ranking_option = "good",
seed = 123)
nodesplit_model <- bayes_nodesplit(configured_data,
n_adapt = 100,
n_iter = 100)
bayes_nodesplit_plot(nodesplit_model)
#> <?xml version="1.0" encoding="UTF-8"?>
#> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="62 6 464 630">
#> <g class="svglite">
#> <defs>
#> <style type="text/css"><![CDATA[
#> .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite circle {
#> fill: none;
#> stroke: #000000;
#> stroke-linecap: round;
#> stroke-linejoin: round;
#> stroke-miterlimit: 10.00;
#> }
#> .svglite text {
#> white-space: pre;
#> }
#> .svglite g.glyphgroup path {
#> fill: inherit;
#> stroke: none;
#> }
#> ]]></style>
#> </defs>
#> <rect width="576.00" height="720.00" style="stroke: none; fill: #FFFFFF;"/>
#> <defs>
#> <clipPath id="cpMC4wMHw1NzYuMDB8MC4wMHw3MjAuMDA=">
#> <rect x="0.00" y="0.00" width="576.00" height="720.00"/>
#> </clipPath>
#> </defs>
#> <g clip-path="url(#cpMC4wMHw1NzYuMDB8MC4wMHw3MjAuMDA=)">
#> <text x="70.70" y="85.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="30.67px" lengthAdjust="spacingAndGlyphs">Study</text>
#> <text x="152.87" y="85.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="40.69px" lengthAdjust="spacingAndGlyphs">P-value</text>
#> <text x="445.29" y="85.49" text-anchor="middle" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="142.48px" lengthAdjust="spacingAndGlyphs">Mean Difference (95% CrI)</text>
#> <text x="70.70" y="103.49" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="135.33px" lengthAdjust="spacingAndGlyphs">Sibutramine vs Placebo</text>
#> <text x="70.70" y="121.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="270.33,117.36 281.81,117.36 " style="stroke-width: 0.75;"/>
#> <circle cx="275.73" cy="117.36" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="121.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="100.02px" lengthAdjust="spacingAndGlyphs">-1.70 (-2.01, -1.36)</text>
#> <text x="70.70" y="135.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="135.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="30.02px" lengthAdjust="spacingAndGlyphs">0.195</text>
#> <polyline points="266.96,131.76 314.07,131.76 " style="stroke-width: 0.75;"/>
#> <circle cx="291.61" cy="131.76" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="135.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="109.36px" lengthAdjust="spacingAndGlyphs">-0.807 (-2.20, 0.461)</text>
#> <text x="70.70" y="150.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="271.48,146.16 281.88,146.16 " style="stroke-width: 0.75;"/>
#> <circle cx="276.29" cy="146.16" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="150.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="100.02px" lengthAdjust="spacingAndGlyphs">-1.67 (-1.94, -1.36)</text>
#> <text x="70.70" y="168.29" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="108.00px" lengthAdjust="spacingAndGlyphs">Orlistat vs Placebo</text>
#> <text x="70.70" y="186.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="278.33,182.16 293.47,182.16 " style="stroke-width: 0.75;"/>
#> <circle cx="284.64" cy="182.16" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="186.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="106.69px" lengthAdjust="spacingAndGlyphs">-1.20 (-1.56, -0.702)</text>
#> <text x="70.70" y="200.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="200.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="30.02px" lengthAdjust="spacingAndGlyphs">0.675</text>
#> <polyline points="271.40,196.56 306.60,196.56 " style="stroke-width: 0.75;"/>
#> <circle cx="289.28" cy="196.56" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="200.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="116.03px" lengthAdjust="spacingAndGlyphs">-0.938 (-1.95, 0.0394)</text>
#> <text x="70.70" y="215.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="278.84,210.96 293.58,210.96 " style="stroke-width: 0.75;"/>
#> <circle cx="286.21" cy="210.96" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="215.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="105.80px" lengthAdjust="spacingAndGlyphs">-1.11 (-1.53, -0.696)</text>
#> <text x="70.70" y="233.09" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="131.33px" lengthAdjust="spacingAndGlyphs">Sibutramine vs Orlistat</text>
#> <text x="70.70" y="251.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="287.31,246.96 309.63,246.96 " style="stroke-width: 0.75;"/>
#> <circle cx="298.81" cy="246.96" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="251.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="109.36px" lengthAdjust="spacingAndGlyphs">-0.400 (-1.05, 0.210)</text>
#> <text x="70.70" y="265.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="265.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="30.02px" lengthAdjust="spacingAndGlyphs">0.445</text>
#> <polyline points="278.19,261.36 304.51,261.36 " style="stroke-width: 0.75;"/>
#> <circle cx="292.44" cy="261.36" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="265.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="120.03px" lengthAdjust="spacingAndGlyphs">-0.760 (-1.56, -0.0784)</text>
#> <text x="70.70" y="279.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="288.00,275.76 304.61,275.76 " style="stroke-width: 0.75;"/>
#> <circle cx="295.96" cy="275.76" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="279.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="120.03px" lengthAdjust="spacingAndGlyphs">-0.561 (-1.01, -0.0726)</text>
#> <text x="70.70" y="297.89" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="119.31px" lengthAdjust="spacingAndGlyphs">Orli_Sibut vs Orlistat</text>
#> <text x="70.70" y="315.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="264.92,311.76 298.31,311.76 " style="stroke-width: 0.75;"/>
#> <circle cx="281.23" cy="311.76" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="315.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="106.69px" lengthAdjust="spacingAndGlyphs">-1.39 (-2.31, -0.428)</text>
#> <text x="70.70" y="330.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="330.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="10.00px" lengthAdjust="spacingAndGlyphs"> 0</text>
#> <polyline points="299.00,326.16 363.49,326.16 " style="stroke-width: 0.75;"/>
#> <circle cx="332.83" cy="326.16" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="330.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="98.69px" lengthAdjust="spacingAndGlyphs">1.52 (-0.390, 3.25)</text>
#> <text x="70.70" y="344.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="275.28,340.56 305.11,340.56 " style="stroke-width: 0.75;"/>
#> <circle cx="290.31" cy="340.56" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="344.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="120.03px" lengthAdjust="spacingAndGlyphs">-0.880 (-1.73, -0.0444)</text>
#> <text x="70.70" y="362.69" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="146.64px" lengthAdjust="spacingAndGlyphs">Orli_Sibut vs Sibutramine</text>
#> <text x="70.70" y="380.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="273.89,376.56 315.60,376.56 " style="stroke-width: 0.75;"/>
#> <circle cx="294.82" cy="376.56" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="380.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="109.36px" lengthAdjust="spacingAndGlyphs">-0.625 (-1.81, 0.548)</text>
#> <text x="70.70" y="395.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="395.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="16.67px" lengthAdjust="spacingAndGlyphs">0.1</text>
#> <polyline points="295.87,390.96 363.07,390.96 " style="stroke-width: 0.75;"/>
#> <circle cx="333.98" cy="390.96" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="395.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="98.69px" lengthAdjust="spacingAndGlyphs">1.59 (-0.566, 3.23)</text>
#> <text x="70.70" y="409.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="283.35,405.36 316.11,405.36 " style="stroke-width: 0.75;"/>
#> <circle cx="300.07" cy="405.36" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="409.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="109.36px" lengthAdjust="spacingAndGlyphs">-0.329 (-1.27, 0.576)</text>
#> <text x="70.70" y="427.49" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="124.00px" lengthAdjust="spacingAndGlyphs">Metformin vs Placebo</text>
#> <text x="70.70" y="445.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="257.79,441.36 317.29,441.36 " style="stroke-width: 0.75;"/>
#> <circle cx="285.14" cy="441.36" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="445.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="102.69px" lengthAdjust="spacingAndGlyphs">-1.17 (-2.72, 0.643)</text>
#> <text x="70.70" y="459.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="459.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="30.02px" lengthAdjust="spacingAndGlyphs">0.225</text>
#> <polyline points="237.48,455.76 287.12,455.76 " style="stroke-width: 0.75;"/>
#> <circle cx="261.67" cy="455.76" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="459.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="100.02px" lengthAdjust="spacingAndGlyphs">-2.50 (-3.86, -1.06)</text>
#> <text x="70.70" y="474.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="252.44,470.16 288.73,470.16 " style="stroke-width: 0.75;"/>
#> <circle cx="269.10" cy="470.16" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="474.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="106.69px" lengthAdjust="spacingAndGlyphs">-2.08 (-3.02, -0.969)</text>
#> <text x="70.70" y="492.29" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="120.00px" lengthAdjust="spacingAndGlyphs">Metformin vs Orlistat</text>
#> <text x="70.70" y="510.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="263.06,506.16 298.04,506.16 " style="stroke-width: 0.75;"/>
#> <circle cx="280.28" cy="506.16" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="510.29" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="106.69px" lengthAdjust="spacingAndGlyphs">-1.45 (-2.42, -0.444)</text>
#> <text x="70.70" y="524.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="524.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="16.67px" lengthAdjust="spacingAndGlyphs">0.1</text>
#> <polyline points="282.10,520.56 334.80,520.56 " style="stroke-width: 0.75;"/>
#> <circle cx="308.58" cy="520.56" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="524.69" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="98.69px" lengthAdjust="spacingAndGlyphs">0.151 (-1.34, 1.63)</text>
#> <text x="70.70" y="539.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="273.84,534.96 307.84,534.96 " style="stroke-width: 0.75;"/>
#> <circle cx="290.30" cy="534.96" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="539.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="109.36px" lengthAdjust="spacingAndGlyphs">-0.881 (-1.81, 0.109)</text>
#> <text x="70.70" y="557.09" style="font-size: 12.00px; font-weight: bold; font-family: "Liberation Sans";" textLength="147.33px" lengthAdjust="spacingAndGlyphs">Metformin vs Sibutramine</text>
#> <text x="70.70" y="575.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="29.34px" lengthAdjust="spacingAndGlyphs">direct</text>
#> <polyline points="291.75,570.96 342.17,570.96 " style="stroke-width: 0.75;"/>
#> <circle cx="316.21" cy="570.96" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="575.09" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="105.36px" lengthAdjust="spacingAndGlyphs">0.582 (-0.799, 2.05)</text>
#> <text x="70.70" y="589.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="38.69px" lengthAdjust="spacingAndGlyphs">indirect</text>
#> <text x="152.87" y="589.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="23.34px" lengthAdjust="spacingAndGlyphs">0.13</text>
#> <polyline points="267.53,585.36 313.37,585.36 " style="stroke-width: 0.75;"/>
#> <circle cx="291.12" cy="585.36" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="589.49" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="109.36px" lengthAdjust="spacingAndGlyphs">-0.834 (-2.17, 0.422)</text>
#> <text x="70.70" y="603.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="42.02px" lengthAdjust="spacingAndGlyphs">network</text>
#> <polyline points="280.78,599.76 317.40,599.76 " style="stroke-width: 0.75;"/>
#> <circle cx="299.85" cy="599.76" r="2.88" style="stroke-width: 0.75; fill: #FFFFFF;"/>
#> <text x="385.27" y="603.89" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="109.36px" lengthAdjust="spacingAndGlyphs">-0.342 (-1.42, 0.649)</text>
#> <polyline points="305.90,614.16 305.90,88.56 " style="stroke-width: 0.75;"/>
#> <polyline points="235.03,606.96 376.77,606.96 " style="stroke-width: 0.75;"/>
#> <polyline points="235.03,614.16 235.03,606.96 " style="stroke-width: 0.75;"/>
#> <polyline points="376.77,614.16 376.77,606.96 " style="stroke-width: 0.75;"/>
#> <text x="305.90" y="625.49" text-anchor="middle" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="6.67px" lengthAdjust="spacingAndGlyphs">0</text>
#> <text x="235.03" y="625.49" text-anchor="middle" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="10.67px" lengthAdjust="spacingAndGlyphs">-4</text>
#> <text x="376.77" y="625.49" text-anchor="middle" style="font-size: 12.00px; font-family: "Liberation Sans";" textLength="6.67px" lengthAdjust="spacingAndGlyphs">4</text>
#> <text x="302.40" y="25.83" text-anchor="middle" style="font-size: 14.40px; font-weight: bold; font-family: "Liberation Sans";" textLength="256.73px" lengthAdjust="spacingAndGlyphs">Inconsistency test with nodesplitting </text>
#> <text x="302.40" y="43.11" text-anchor="middle" style="font-size: 14.40px; font-weight: bold; font-family: "Liberation Sans";" textLength="139.97px" lengthAdjust="spacingAndGlyphs">model for all studies</text>
#> </g>
#> </g>
#> </svg>
#>
# }