% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/longitree.R
\name{treeplot}
\alias{treeplot}
\title{Decision Tree Plot Visualisation for Longitudinal Data}
\usage{
treeplot(
  x,
  tree = NULL,
  snsize = 50,
  spsize = 5,
  plotsize = 80,
  linesize1 = 0.3,
  linesize2 = 1,
  tnsize = 60
)
}
\arguments{
\item{x}{A \code{longitree} or \code{threetrees} object.}

\item{tree}{Integer 1, 2, or 3 selecting which tree to plot when \code{x}
is a \code{threetrees} object.}

\item{snsize}{Split-node label size (default 50).}

\item{spsize}{Split-point label size (default 5).}

\item{plotsize}{Overall plot size (default 80).}

\item{linesize1}{Branch line width (default 0.3).}

\item{linesize2}{Main line width (default 1).}

\item{tnsize}{Terminal-node label size (default 60).}
}
\value{
A \code{ggplot2}/\code{ggparty} object.
}
\description{
Visualises the structure of a decision tree for longitudinal
data.  Built on \pkg{ggparty}.  Each split node displays the node
number, split variable, \eqn{p}-value, and weight \eqn{w}.  Each
terminal node displays the node number, sample size \eqn{N}, and the
intercept (\eqn{\hat\beta_0}) and slope (\eqn{\hat\beta_1}) from a
linear mixed-effects model fitted within that node.  Individual
longitudinal trajectories are shown as dashed lines; the predicted
values (average at each time point) are shown as solid lines, with the
response variable on the vertical axis and time on the horizontal axis.
}
\references{
Obata, R. and Sugimoto, T. (2026). A decision tree analysis for
longitudinal measurement data and its applications.
\emph{Advances in Data Analysis and Classification}.
\doi{10.1007/s11634-025-00665-2}
}
\seealso{
\code{\link{longitree}}, \code{\link{threetrees}}
}
