% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/janusplot-package.R
\docType{package}
\name{janusplot-package}
\alias{janusplot-package}
\title{janusplot: Asymmetric Smoothed-Association Matrices via GAM Fits}
\description{
\code{janusplot} renders pairwise, asymmetric smoothed-association matrices
of continuous variables. Each cell shows the fitted spline from an
\code{\link[mgcv:gam]{mgcv::gam()}} model, with upper and lower triangles encoding the two
directional regressions \code{y ~ s(x)} and \code{x ~ s(y)} respectively.

Unlike a Pearson correlation matrix (one scalar per pair, symmetric),
a smoothed-association matrix gives two curves per pair and is
intentionally asymmetric. Heteroscedasticity, leverage, and directional
non-linearity become visually evident.
}
\section{Main functions}{
\itemize{
\item \code{\link[=janusplot]{janusplot()}} — returns a ggplot of the matrix.
\item \code{\link[=janusplot_data]{janusplot_data()}} — returns the raw GAM fits + per-cell metrics
(for custom plotting or downstream analysis).
}
}

\section{Asymmetry index}{
For each pair, the asymmetry index \verb{A_ij = |EDF_yx - EDF_xy| / (EDF_yx + EDF_xy)} is bounded in [0, 1]. Values near 0 indicate
symmetric complexity; values near 1 indicate the two directional
fits differ sharply in effective degrees of freedom.

Under the additive noise model (Hoyer et al. 2009; Peters et al.
2014), the two directional regressions are generally asymmetric
when the data-generating process is non-linear, and this
asymmetry identifies the causal direction under mild conditions.
The asymmetry index is offered here as a \emph{visual pre-discovery
diagnostic} rather than a causal inference procedure; see the
package vignette and accompanying paper for full scope and
limitations (in particular the failure modes under
heteroscedasticity, confounding, and Gaussian-linear DGPs).
}

\seealso{
Useful links:
\itemize{
  \item \url{https://github.com/max578/janusplot}
  \item \url{https://max578.github.io/janusplot/}
  \item Report bugs at \url{https://github.com/max578/janusplot/issues}
}

}
\author{
\strong{Maintainer}: Max Moldovan \email{max.moldovan@adelaide.edu.au} (\href{https://orcid.org/0000-0001-9680-8474}{ORCID}) [copyright holder]

}
\keyword{internal}
