This function simulates multivariate crop yield data using a time-varying copula combined with Generalized Extreme Value (GEV) margins and Bayesian Structural Time Series (BSTS) models.
simulation_generalized(
nsim = 100,
n_train,
n_test,
copula,
init_params,
fn,
U_train,
Z_train,
X,
Y_test,
BSTS_list
)
A list containing:
Results from the optimization process.
Simulated copula parameters across replications.
Simulated final BSTS-based forecasts.
Mean squared error for each simulation run.
Integer, number of simulation replications.
Integer, number of training observations.
Integer, number of test observations.
Character, specifying the copula type: "Clayton", "Frank", "Gumbel", "Joe", or "Gaussian".
Numeric vector, initial parameter values for optimization.
Function, log-likelihood function for parameter estimation.
Numeric matrix (n_train x D), pseudo-observations for the copula.
Numeric array (n_train x D x M), observed data for each margin and sub-feature.
Numeric matrix (n_train x M), risk factors for the dynamic copula parameter.
Numeric matrix (n_test x D), true future values for MSE calculation.
List of length D, each element is a BSTS model for a different margin.