% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/johnson_neyman.R
\name{jn_layer}
\alias{jn_layer}
\title{Add Johnson-Neyman Bounds to an interplot}
\usage{
jn_layer(
  jn,
  line_color = "red",
  linetype = "dashed",
  shade_color = "grey80",
  shade_alpha = 0.15,
  label = TRUE
)
}
\arguments{
\item{jn}{A \code{jn_interval} object produced by \code{\link{jn_interval}}.}

\item{line_color}{Color of the boundary lines. Default \code{"red"}.}

\item{linetype}{Line type for boundaries. Default \code{"dashed"}.}

\item{shade_color}{Fill color for non-significant regions. Default \code{"grey80"}.}

\item{shade_alpha}{Transparency of shading. Default \code{0.15}.}

\item{label}{Logical; if \code{TRUE} (default), annotate the JN bound values.}
}
\value{
A list of \code{ggplot2} layers.
}
\description{
Returns a list of \code{ggplot2} layers that overlay Johnson-Neyman significance
boundaries on an \code{interplot} output. Add to any interplot with \code{+}.
}
\examples{
m <- lm(mpg ~ wt * cyl, data = mtcars)
jn <- jn_interval(m, "cyl", "wt")
interplot(m, "cyl", "wt") + jn_layer(jn)

}
