% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate-multilevel.R
\name{simulate_dcvar_multilevel}
\alias{simulate_dcvar_multilevel}
\title{Simulate data from a multilevel copula VAR(1) model}
\usage{
simulate_dcvar_multilevel(
  N = 40,
  n_time = 100,
  phi_bar = c(0.3, 0.1, 0.1, 0.3),
  tau_phi = c(0.1, 0.05, 0.05, 0.1),
  sigma = c(1, 1),
  rho = 0.3,
  burnin = 30,
  center = TRUE,
  seed = NULL
)
}
\arguments{
\item{N}{Number of units.}

\item{n_time}{Number of time points per unit.}

\item{phi_bar}{Population mean for VAR coefficients (length-4 vector:
phi11, phi12, phi21, phi22).}

\item{tau_phi}{Population SD for each VAR coefficient (length-4 vector).}

\item{sigma}{Innovation SDs (length-2 vector).}

\item{rho}{Global copula correlation.}

\item{burnin}{Number of burn-in observations to discard (default: 30).}

\item{center}{Logical; person-mean center the data (default: \code{TRUE}).}

\item{seed}{Random seed for reproducibility.}
}
\value{
A named list with:
\itemize{
\item \code{data}: panel data frame with columns \code{id}, \code{time}, \code{y1}, \code{y2}
\item \code{true_params}: list of true parameter values
\item \code{person_means}: N x 2 matrix of person means (before centering)
}
}
\description{
Generates panel data with unit-specific VAR coefficients drawn from
a population distribution and a global copula correlation. The simulator
matches the fitted multilevel model support by leaving unit-level VAR
matrices unconstrained; nonstationary draws are possible.
}
