% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-forest.R
\name{plot_edge_diff_forest}
\alias{plot_edge_diff_forest}
\alias{plot_edge_diff_forest.boot_glasso}
\title{Forest Plot for Bootstrap Edge Differences}
\usage{
plot_edge_diff_forest(x, ...)

\method{plot_edge_diff_forest}{boot_glasso}(
  x,
  alpha = NULL,
  layout = c("linear", "circular", "chord", "tile"),
  show_nonsig = FALSE,
  nonzero_only = FALSE,
  sort_by = c("estimate", "significance", "name"),
  n_top = NULL,
  pos_color = "#C0392B",
  neg_color = "#2C6E8A",
  nonsig_color = "#AAAAAA",
  ring_color = "#C8C8C8",
  label_size = 2.3,
  label_color = NULL,
  point_size = if (match.arg(layout) == "circular") 2 else 3,
  r_inner = 0.38,
  r_outer = 0.72,
  title = NULL,
  subtitle = NULL,
  ...
)
}
\arguments{
\item{x}{A \code{boot_glasso} object with \code{$boot_edges} and
\code{$edge_diff_p}.}

\item{...}{Currently unused.}

\item{alpha}{Significance threshold. Default: inherits from object.}

\item{layout}{\code{"linear"} (default), \code{"circular"}, \code{"chord"},
or \code{"tile"}. The chord layout places all edge names on a unit circle
and connects significant pairs with bezier arcs; arc width and colour
encode the mean bootstrap difference. The tile layout draws the
pairwise-difference matrix.}

\item{show_nonsig}{Include non-significant pairs? Default \code{FALSE}.}

\item{nonzero_only}{If \code{TRUE}, restrict to edges that are non-zero in
the original network (identified via \code{$original_pcor}). Useful for
EBICglasso results where many edges are regularised to exactly zero.
Default \code{FALSE}.}

\item{sort_by}{\code{"estimate"} (default), \code{"significance"}, or
\code{"name"} (linear only).}

\item{n_top}{Restrict to top N pairs by absolute difference.}

\item{pos_color}{Colour when edge1 > edge2. Default crimson.}

\item{neg_color}{Colour when edge1 < edge2. Default teal.}

\item{nonsig_color}{Colour for non-significant pairs.}

\item{ring_color}{Ring colour (circular/chord). Default light grey.}

\item{label_size}{Text size. Default \code{2.3}.}

\item{label_color}{Fixed label colour (\code{NULL} = inherit).}

\item{point_size}{Size of estimate square (linear/circular).}

\item{r_inner}{Inner ring radius (circular). Default \code{0.38}.}

\item{r_outer}{Outer ring radius (circular). Default \code{0.72}.}

\item{title}{Plot title.}

\item{subtitle}{Plot subtitle.}
}
\value{
A \code{ggplot} object.
}
\description{
Visualises pairwise edge weight differences from a \code{boot_glasso} object.
Each row (linear) or spoke (circular) is one edge pair; the CI bar spans the
bootstrap CI of the difference; a dashed line/ring marks zero.
Red = first edge larger; blue = second edge larger.
}
\examples{
\dontshow{if (requireNamespace("Nestimate", quietly = TRUE)) withAutoprint(\{ # examplesIf}
set.seed(1)
data1 <- as.data.frame(matrix(rnorm(60), 20, 3, dimnames = list(NULL, c("A","B","C"))))
# cs_iter only drives case-dropping stability, which this plot does not use.
bg <- Nestimate::boot_glasso(data1, iter = 50, cs_iter = 25,
                             centrality = c("strength", "expected_influence"))
plot_edge_diff_forest(bg)
\dontshow{\}) # examplesIf}
}
