% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nw_tools.R
\name{nw_triangle}
\alias{nw_triangle}
\title{Plot Normal-Wald shape parameters on the asymmetry-steepness triangle}
\usage{
nw_triangle(obj, add = FALSE, details = FALSE, ...)
}
\arguments{
\item{obj}{A fitted object containing components \code{beta} and \code{gamma},
typically an object returned by \code{nwbass()}.}

\item{add}{Logical; if \code{FALSE}, initialize a new triangle plot. If
\code{TRUE}, add points to the current plot.}

\item{details}{Logical; if \code{TRUE} and \code{add = FALSE}, add a few
reference distributions to the plot.}

\item{...}{Additional graphical arguments passed to \code{\link{points}}.}
}
\value{
Invisibly returns a data frame with columns \code{asymmetry} and
\code{steepness}.
}
\description{
Visualizes posterior draws of the Normal-Wald shape parameters in terms of
asymmetry and steepness. The plotted coordinates are
\eqn{\text{steepness} = (1 + \gamma)^{-1/2}} and
\eqn{\text{asymmetry} = \beta (\beta^2 + \gamma^2)^{-1/2} \times \text{steepness}}.
}
\details{
This plot provides a simple geometric summary of the shape of the
Normal-Wald likelihood. The upper boundary corresponds to symmetric models,
while points away from zero on the horizontal axis indicate asymmetry.
}
\examples{
# mod is a fitted nwbass model
\donttest{
# Simple example
n <- 200
X <- lhs::maximinLHS(n, 2)
f <- 20 * apply(X, 1, function(x) sin(pi * x[1]) + x[2]^2)
eps <- rgamma(n, 3, 1.5) - 2
y <- f + eps

mod <- nwbass(X, y,
              m_beta=0, s_beta=10,
              m_gamma = nw_gamma_prior()[1], s_gamma = nw_gamma_prior()[2])
nw_triangle(mod)
}
}
