% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-preparation.R
\name{prepare_constant_data}
\alias{prepare_constant_data}
\title{Prepare data for the constant copula model}
\usage{
prepare_constant_data(
  data,
  vars,
  time_var = "time",
  standardize = TRUE,
  margins = "normal",
  skew_direction = NULL,
  prior_mu_sd = 2,
  prior_phi_sd = 0.5,
  prior_sigma_eps_rate = 1,
  prior_z_rho_sd = 1,
  allow_gaps = FALSE
)
}
\arguments{
\item{data}{A data frame with time series observations.}

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

\item{time_var}{Name of the time column (default: \code{"time"}).}

\item{standardize}{Logical; whether to z-score variables (default: \code{TRUE}).}

\item{margins}{Marginal distribution specification. Either a single string
applied to both variables, or a length-2 character vector giving a
per-variable (mixed) margin (for example \code{c("normal", "exponential")}).
Each entry is one of \code{"normal"} (default), \code{"exponential"},
\code{"skew_normal"}, or \code{"gamma"}. When the two entries differ the returned
data carries an integer \code{family} array for the generic mixed-margins Stan
model; identical entries are equivalent to the scalar form and reuse the
specialised single-family model.}

\item{skew_direction}{Integer vector of length 2 of \code{1} (right-skewed) or
\code{-1} (left-skewed). Required whenever any dimension uses an
\code{"exponential"} or \code{"gamma"} margin; only those dimensions consult it.}

\item{prior_mu_sd}{Prior SD for intercepts: \code{mu ~ normal(0, prior_mu_sd)}.}

\item{prior_phi_sd}{Prior SD for VAR coefficients: \code{Phi ~ normal(0, prior_phi_sd)}.}

\item{prior_sigma_eps_rate}{Prior mean for innovation SDs:
\code{sigma_eps ~ exponential(1/prior_sigma_eps_rate)}. Default \code{1} gives
\code{exponential(1)} with prior mean 1.}

\item{prior_z_rho_sd}{Prior SD for rho on Fisher-z scale (default: 1.0).}

\item{allow_gaps}{Logical; if \code{FALSE} (default), interior missing values
cause an error. If \code{TRUE}, they produce a warning and are removed.}
}
\value{
A named list suitable as Stan data input.
}
\description{
Transforms a data frame into a list suitable for the constant copula Stan model.
}
