% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/var_data.R
\name{new_var_data}
\alias{new_var_data}
\alias{print.var_data}
\title{Create a VAR data object}
\usage{
new_var_data(
  empirical,
  predicted,
  residuals,
  simulated = NULL,
  var_names = NULL
)

\method{print}{var_data}(x, ...)
}
\arguments{
\item{empirical}{Numeric matrix or list of matrices. Observed values.}

\item{predicted}{Numeric matrix or list of matrices. Model predictions.}

\item{residuals}{Numeric matrix or list of matrices. Residuals
(`empirical - predicted`).}

\item{simulated}{Optional numeric matrix or list of matrices. Data
simulated from the fitted model. Required only when plotting the
`"simulated"` panel.}

\item{var_names}{Optional character vector of length `p` with variable
names used as plot labels. Defaults to `"V1"`, `"V2"`, etc.}

\item{x}{A `var_data` object.}

\item{...}{Not used; present for S3 method compatibility.}
}
\value{
An object of class `var_data`.
}
\description{
Constructs a `var_data` object used as input to [plot_var_check()].
Each component is either a single `T x p` numeric matrix (single subject)
or a list of `T_i x p` matrices (multiple subjects). Single matrices are
coerced to a length-1 list automatically.
}
\examples{
set.seed(1)
emp <- matrix(rnorm(200), nrow = 100, ncol = 2)
pred <- emp + matrix(rnorm(200, sd = 0.3), 100, 2)
res <- emp - pred
sim <- matrix(rnorm(200), 100, 2)
vd <- new_var_data(emp, pred, res, sim, var_names = c("Mood", "Energy"))
}
