% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{simulate_dcvar}
\alias{simulate_dcvar}
\title{Simulate data from a copula VAR(1) model}
\usage{
simulate_dcvar(
  n_time,
  rho_trajectory,
  mu = c(0, 0),
  Phi = matrix(c(0.3, 0.1, 0.1, 0.3), 2, 2),
  sigma_eps = c(1, 1),
  margins = "normal",
  skew_direction = NULL,
  skew_params = NULL,
  seed = NULL
)
}
\arguments{
\item{n_time}{Number of time points.}

\item{rho_trajectory}{Numeric vector of length \code{n_time - 1} specifying the
correlation at each time step. Use \code{\link[=rho_constant]{rho_constant()}}, \code{\link[=rho_decreasing]{rho_decreasing()}},
etc.}

\item{mu}{Intercept vector of length 2 (default: \code{c(0, 0)}).}

\item{Phi}{VAR(1) coefficient matrix, 2x2 (default:
\code{matrix(c(0.3, 0.1, 0.1, 0.3), 2, 2)}).}

\item{sigma_eps}{Innovation standard deviations, length 2 (default:
\code{c(1, 1)}). Used for normal margins.}

\item{margins}{Character: \code{"normal"} (default), \code{"exponential"},
\code{"skew_normal"}, or \code{"gamma"}.}

\item{skew_direction}{Length-2 integer vector of +1/-1. Required for
\code{"exponential"} and \code{"gamma"} margins.}

\item{skew_params}{Named list of margin-specific parameters. For
\code{"skew_normal"}: \code{alpha} (length-2 vector of skew-normal shape params).
For \code{"gamma"}: \code{shape} (scalar gamma shape parameter).}

\item{seed}{Random seed for reproducibility.}
}
\value{
A named list with:
\itemize{
\item \code{Y}: \verb{n_time x 2} observation matrix
\item \code{Y_df}: data frame with columns \code{time}, \code{y1}, \code{y2} (ready for
\code{\link[=dcvar]{dcvar()}})
\item \code{true_params}: list of true parameter values
}
}
\description{
Generates bivariate time series data with correlated innovations
driven by a specified rho trajectory.
}
\examples{
sim <- simulate_dcvar(n_time = 100, rho_trajectory = rho_decreasing(100))
head(sim$Y_df)
plot(sim$true_params$rho, type = "l")
}
