% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-bootstrap.R
\name{splot.tna_bootstrap}
\alias{splot.tna_bootstrap}
\title{Plot Bootstrap Results}
\usage{
splot.tna_bootstrap(
  x,
  display = c("styled", "significant", "full", "ci"),
  edge_style_sig = 1,
  edge_style_nonsig = 2,
  color_nonsig = "#888888",
  show_ci = FALSE,
  show_stars = TRUE,
  width_by = NULL,
  inherit_style = TRUE,
  ...
)
}
\arguments{
\item{x}{A tna_bootstrap object (from tna::bootstrap).}

\item{display}{Display mode:
\itemize{
\item "styled" (default): All edges with styling to distinguish significant/non-significant
\item "significant": Only significant edges
\item "full": All edges without significance styling
\item "ci": Show CI bands on edges
}}

\item{edge_style_sig}{Line style for significant edges (1=solid). Default 1.}

\item{edge_style_nonsig}{Line style for non-significant edges (2=dashed). Default 2.}

\item{color_nonsig}{Color for non-significant edges. Default "#888888" (grey).}

\item{show_ci}{Logical: overlay CI bands on edges? Default FALSE.}

\item{show_stars}{Logical: show significance stars (*, **, ***) on edges? Default TRUE.}

\item{width_by}{Optional: "cr_lower" to scale edge width by lower consistency range bound.}

\item{inherit_style}{Logical: inherit colors/layout from original TNA model? Default TRUE.}

\item{...}{Additional arguments passed to splot().}
}
\value{
Invisibly returns the plot.
}
\description{
Visualizes bootstrap analysis results with styling to distinguish
significant from non-significant edges. Works with tna_bootstrap objects
from the tna package.
}
\details{
The function expects a tna_bootstrap object containing:
\itemize{
\item \code{weights} or \code{weights_orig}: Original weight matrix
\item \code{weights_sig}: Significant weights only (optional)
\item \code{p_values}: P-value matrix
\item \code{ci_lower}, \code{ci_upper}: Confidence interval bounds
\item \code{level}: Significance level (default 0.05)
\item \code{model}: Original TNA model for styling inheritance
}

Edge styling in "styled" mode:
\itemize{
\item Significant edges: solid dark blue, bold labels with stars, rendered on top
\item Non-significant edges: dashed pink, plain labels, rendered behind
}
}
\examples{
\dontrun{
# Create a mock tna_bootstrap object with synthetic data
set.seed(42)
w <- matrix(c(0, 0.3, 0.1, 0.2, 0, 0.4, 0.3, 0.1, 0), 3, 3)
rownames(w) <- colnames(w) <- c("A", "B", "C")
p <- matrix(c(1, 0.01, 0.5, 0.03, 1, 0.001, 0.2, 0.8, 1), 3, 3)
boot <- list(
  weights = w,
  p_values = p,
  ci_lower = w - 0.05,
  ci_upper = w + 0.05,
  level = 0.05,
  model = list(weights = w, labels = c("A", "B", "C"))
)
class(boot) <- c("tna_bootstrap", "list")
splot(boot)
splot(boot, display = "significant")
}

}
