% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-preparation.R
\name{prepare_multilevel_data}
\alias{prepare_multilevel_data}
\title{Prepare data for the multilevel copula VAR model}
\usage{
prepare_multilevel_data(
  data,
  vars,
  id_var = "id",
  time_var = "time",
  center = TRUE,
  prior_phi_bar_sd = 0.5,
  prior_tau_phi_scale = 0.2,
  prior_sigma_sd = 1,
  prior_rho_sd = 0.5,
  margins = "normal",
  skew_direction = NULL
)
}
\arguments{
\item{data}{A data frame in long (panel) format.}

\item{vars}{Character vector of two variable names.}

\item{id_var}{Name of the unit/person ID column.}

\item{time_var}{Name of the time column.}

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

\item{prior_phi_bar_sd}{Prior SD for phi_bar.}

\item{prior_tau_phi_scale}{Prior scale for tau_phi.}

\item{prior_sigma_sd}{Prior SD for sigma.}

\item{prior_rho_sd}{Prior SD for rho.}

\item{margins}{Character string specifying the marginal distribution.
One of \code{"normal"} (default) or \code{"exponential"}.}

\item{skew_direction}{Length-2 integer vector of +1/-1 for exponential
margins.}
}
\value{
A named list suitable as Stan data input.
}
\description{
Prepare data for the multilevel copula VAR model
}
