% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate-sem.R
\name{simulate_dcvar_sem}
\alias{simulate_dcvar_sem}
\title{Simulate data from a SEM copula VAR(1) model}
\usage{
simulate_dcvar_sem(
  n_time = 200,
  J = 3,
  lambda = rep(sqrt(0.8), 3),
  sigma_e = sqrt(0.2),
  Phi = matrix(c(0.5, 0.15, 0.15, 0.3), 2, 2),
  mu = c(0, 0),
  margins = "normal",
  sigma = c(1, 1),
  sigma_exp = c(1, 1),
  skew_direction = NULL,
  skew_params = NULL,
  rho = 0.3,
  rho_trajectory = NULL,
  phi_trajectory = NULL,
  sigma_trajectory = NULL,
  tv_sigma_k = NULL,
  burnin = 0,
  seed = NULL
)
}
\arguments{
\item{n_time}{Number of time points.}

\item{J}{Number of indicators per latent variable.}

\item{lambda}{Numeric vector of length J with factor loadings.}

\item{sigma_e}{Measurement error SD (scalar).}

\item{Phi}{2x2 VAR coefficient matrix.}

\item{mu}{Length-2 intercept vector.}

\item{margins}{Latent-innovation marginal family. Either a single string
applied to both latent variables, or a length-2 character vector for
per-variable (mixed) margins, e.g. \code{c("normal", "gamma")}, where each entry
is one of \code{"normal"}, \code{"exponential"}, \code{"skew_normal"}, or \code{"gamma"}.}

\item{sigma}{Length-2 latent innovation scale vector used by normal,
skew-normal, gamma, and mixed-margin specifications. Values are on each
family's natural residual scale: innovation SD for normal/skew-normal,
and \code{sigma_gam} for gamma. Homogeneous exponential margins use
\code{sigma_exp} instead.}

\item{sigma_exp}{Length-2 shifted-exponential scale vector for the
single-family exponential path.}

\item{skew_direction}{Integer vector of length 2 of \code{1}/\code{-1}. Required
whenever any dimension uses an \code{"exponential"} or \code{"gamma"} margin.}

\item{skew_params}{Named list of margin-specific parameters for mixed
margins: \code{alpha} (length-2 skew-normal shape) and/or \code{shape} (scalar gamma
shape).}

\item{rho}{Copula correlation.}

\item{rho_trajectory}{Optional numeric vector of length \code{n_time - 1} for a
time-varying copula correlation. Mutually exclusive with \code{rho}.}

\item{phi_trajectory}{Optional time-varying latent VAR coefficient paths,
accepted in the same forms as \code{\link[=simulate_dcvar]{simulate_dcvar()}}.}

\item{sigma_trajectory}{Optional time-varying latent innovation scale paths,
accepted in the same forms as \code{\link[=simulate_dcvar]{simulate_dcvar()}}. The supplied value is
each family's natural scale: innovation SD (normal), residual SD
(skew-normal), \code{sigma_exp} (exponential), \code{sigma_gam} (gamma).}

\item{tv_sigma_k}{Soft-barrier sharpness for time-varying exponential/gamma
scales.}

\item{burnin}{Retained for backward compatibility but ignored. Default \code{0}
keeps the default simulation path aligned with the fitted SEM model,
which conditions on \code{x_0 = 0} and treats the first returned state as
observed rather than drawn after a burn-in period.}

\item{seed}{Random seed for reproducibility.}
}
\value{
A named list with:
\itemize{
\item \code{data}: data frame with columns \code{time}, \code{y1_1}, ..., \code{y1_J},
\code{y2_1}, ..., \code{y2_J}
\item \code{true_params}: list of true parameter values
\item \code{latent_states}: \verb{n_time x 2} matrix of true latent states
\item \code{innovations}: \verb{n_time x 2} matrix of true innovations
}
}
\description{
Generates indicator-level time series data from a latent VAR(1) process
with Gaussian copula dependence and a fixed measurement model.
}
