% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-forest.R
\name{plot_bootstrap_forest}
\alias{plot_bootstrap_forest}
\alias{plot_bootstrap_forest.net_bootstrap}
\alias{plot_bootstrap_forest.tna_bootstrap}
\alias{plot_bootstrap_forest.boot_glasso}
\alias{plot_bootstrap_forest.net_bootstrap_group}
\title{Forest Plot for Bootstrap Network Results}
\usage{
plot_bootstrap_forest(x, ...)

\method{plot_bootstrap_forest}{net_bootstrap}(
  x,
  alpha = NULL,
  layout = c("linear", "circular", "grouped"),
  interval = c("ci", "cr", "both"),
  show_nonsig = TRUE,
  sort_by = c("estimate", "significance", "name"),
  n_top = NULL,
  node_colors = NULL,
  sig_color = "#2C6E8A",
  cr_color = "#D4829A",
  nonsig_color = "#CCCCCC",
  ring_color = "#C8C8C8",
  median_color = "#AAAAAA",
  label_size = NULL,
  label_color = NULL,
  point_size = NULL,
  r_inner = NULL,
  r_outer = NULL,
  gap_rad = NULL,
  label_offset = NULL,
  src_label_size = NULL,
  margins = c(0.1, 0.1, 0.1, 0.1),
  scale = 1,
  title = NULL,
  subtitle = NULL,
  ...
)

\method{plot_bootstrap_forest}{tna_bootstrap}(
  x,
  alpha = NULL,
  layout = c("linear", "circular", "grouped"),
  interval = c("ci", "cr", "both"),
  show_nonsig = TRUE,
  sort_by = c("estimate", "significance", "name"),
  n_top = NULL,
  node_colors = NULL,
  sig_color = "#2C6E8A",
  cr_color = "#D4829A",
  nonsig_color = "#CCCCCC",
  ring_color = "#C8C8C8",
  median_color = "#AAAAAA",
  label_size = NULL,
  label_color = NULL,
  point_size = NULL,
  r_inner = NULL,
  r_outer = NULL,
  gap_rad = NULL,
  label_offset = NULL,
  src_label_size = NULL,
  margins = c(0.1, 0.1, 0.1, 0.1),
  scale = 1,
  title = NULL,
  subtitle = NULL,
  ...
)

\method{plot_bootstrap_forest}{boot_glasso}(
  x,
  alpha = NULL,
  layout = c("linear", "circular", "grouped"),
  interval = c("ci", "cr", "both"),
  show_nonsig = TRUE,
  sort_by = c("estimate", "significance", "name"),
  n_top = NULL,
  node_colors = NULL,
  sig_color = "#2C6E8A",
  cr_color = "#D4829A",
  nonsig_color = "#CCCCCC",
  ring_color = "#C8C8C8",
  median_color = "#AAAAAA",
  label_size = NULL,
  label_color = NULL,
  point_size = NULL,
  r_inner = NULL,
  r_outer = NULL,
  gap_rad = NULL,
  label_offset = NULL,
  src_label_size = NULL,
  margins = c(0.1, 0.1, 0.1, 0.1),
  scale = 1,
  title = NULL,
  subtitle = NULL,
  ...
)

\method{plot_bootstrap_forest}{net_bootstrap_group}(
  x,
  layout = c("linear", "circular"),
  interval = c("ci", "cr", "both"),
  show_nonsig = TRUE,
  n_top = NULL,
  all_edges = FALSE,
  pos_color = NULL,
  title = NULL,
  subtitle = NULL,
  label_size = 2.8,
  ...
)
}
\arguments{
\item{x}{A \code{tna_bootstrap} (from \code{tna::bootstrap}),
\code{net_bootstrap}, or \code{boot_glasso} object.}

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

\item{alpha}{Significance threshold. Default: inherits from the object
(\code{$ci_level} or \code{$alpha}), falling back to \code{0.05}.}

\item{layout}{\code{"linear"} (default) draws the classic tall forest plot;
\code{"circular"} arranges each edge as a spoke around a circle, with the
inner ring at the data minimum and the outer ring at the data maximum.}

\item{interval}{Which interval to display: \code{"ci"} (bootstrap confidence
interval, default), \code{"cr"} (consistency range, stability inference
only), or \code{"both"} (CI as outer bar, CR as inner bar).}

\item{show_nonsig}{Logical: include non-significant edges (greyed out)?
Default \code{TRUE}.}

\item{sort_by}{How to order edges on the y-axis (linear layout) or
clockwise from top (radial layout):
\code{"estimate"} (default, ascending), \code{"significance"} (most
significant at top), or \code{"name"} (alphabetical).}

\item{n_top}{Integer: restrict to the \code{n_top} edges with the largest
absolute estimate. Applied after significance filtering. Default \code{NULL}.}

\item{sig_color}{Colour for significant CI bars and points. Default \code{"#2C6E8A"} (teal-blue).}

\item{cr_color}{Colour for the consistency range bar (\code{interval = "cr"} or \code{"both"}).
Default \code{"#D4820A"} (amber).}

\item{nonsig_color}{Colour for non-significant edges. Default \code{"#CCCCCC"}.}

\item{ring_color}{Colour for the reference rings (radial layout only). Default \code{"#C8C8C8"}.}

\item{median_color}{Colour for the dashed median ring (radial layout only). Default \code{"#AAAAAA"}.}

\item{label_size}{Text size for edge labels (radial layout only). Default \code{2.3}.}

\item{label_color}{Fixed colour for edge labels (radial layout only). \code{NULL} (default)
inherits the edge colour (teal for significant, grey for non-significant).}

\item{point_size}{Size of the estimate square. Default \code{3} (linear) or \code{2} (radial).}

\item{r_inner}{Inner ring radius (grouped layout). Default \code{NULL} (auto).}

\item{r_outer}{Outer ring radius (grouped layout). Default \code{NULL} (auto).}

\item{gap_rad}{Gap in radians between sectors (grouped layout). Default \code{NULL} (auto).}

\item{label_offset}{Distance between outer ring and labels (grouped layout). Default \code{NULL} (auto).}

\item{src_label_size}{Text size for source node labels in the center (grouped layout).
Default \code{NULL} (auto, \code{label_size * 0.80}).}

\item{margins}{Margins as \code{c(bottom, left, top, right)} fractions (grouped layout).
Default \code{c(0.1, 0.1, 0.1, 0.1)}.}

\item{scale}{Scaling factor applied to all text and point sizes (grouped layout).
Default \code{1}. Use values > 1 for high-DPI output, < 1 for small devices.}

\item{title}{Plot title. Default \code{NULL}.}

\item{subtitle}{Plot subtitle. Default \code{NULL}.}
}
\value{
A \code{ggplot} object.
}
\description{
A ggplot2-based forest plot for \code{net_bootstrap} and \code{boot_glasso}
objects. Each row is one network edge; horizontal bars span the confidence
interval and a filled square marks the point estimate. A dashed reference
line runs through zero.

Produces a ggplot2 forest plot where each row is one network edge, the
square marks the bootstrap mean estimate, and the horizontal bar spans the
selected interval. A dashed reference line runs through zero. Significant
edges are highlighted in colour; non-significant ones appear in grey (only
shown when \code{show_nonsig = TRUE}).
}
\details{
For \code{net_bootstrap} objects from stability inference, both a bootstrap
confidence interval (\code{ci_lower}/\code{ci_upper}) and a consistency
range (\code{cr_lower}/\code{cr_upper}) are available. Use
\code{interval = "both"} to overlay both on the same plot.
}
\keyword{internal}
