\name{simulate_scenario}
\alias{simulate_scenario}
\title{Simulate a panel ARX-GARCHX dataset}
\description{
Simulates a balanced panel from one of four built-in demonstration scenarios.
Returns a long-format data frame with the response \code{y}, oracle mean
and variance, the covariate block, optional regime indicator, and the oracle
exceedance probability.
}
\usage{
simulate_scenario(scen = 1L, S = 8L, T = 240L, L = 20L,
                  d_noise = 20L, noise_kind = c("iid", "ar1"),
                  threshold_c = 1.0, seed = NULL,
                  floor_sigma2 = 1e-10)
}
\arguments{
\item{scen}{Integer 1:4 selecting one of the four scenarios.}
\item{S}{Number of subjects.}
\item{T}{Number of post-burn-in time points per subject.}
\item{L}{Mean run length for the piecewise regime in Scenario 4.}
\item{d_noise}{Number of nuisance covariates with zero true effect.}
\item{noise_kind}{Either \code{"iid"} or \code{"ar1"}.}
\item{threshold_c}{Threshold \eqn{c} at which the oracle exceedance
probability is computed.}
\item{seed}{Random seed.}
\item{floor_sigma2}{Lower clamp on simulated variance.}
}
\value{
A data frame with columns \code{s}, \code{t}, \code{y}, oracle
\code{mu} and \code{sigma}, covariate columns, optional \code{Xbin},
and the oracle exceedance probability \code{pi_true}. Generating
parameters are stored in \code{attr(., "params")}.
}
\examples{
set.seed(7)
sim <- simulate_scenario(scen = 2, S = 4, T = 50,
                         d_noise = 3, noise_kind = "iid", seed = 7)
head(sim)
}
\references{
Tibshirani R. (1996). "Regression Shrinkage and Selection Via the Lasso."
\emph{Journal of the Royal Statistical Society: Series B}, 58(1), 267--288.
\doi{10.1111/j.2517-6161.1996.tb02080.x}

Bollerslev T. (1986). "Generalized Autoregressive Conditional Heteroskedasticity."
\emph{Journal of Econometrics}, 31(3), 307--327.
\doi{10.1016/0304-4076(86)90063-1}

Medeiros M. C. and Mendes E. F. (2016). "L1-Regularization of
High-Dimensional Time-Series Models with Non-Gaussian and Heteroskedastic
Errors." \emph{Journal of Econometrics}, 191(1), 255--271.
\doi{10.1016/j.jeconom.2015.10.011}
}
