View source: R/simul_fun_noGEV.R
simul.fun.noGEV | R Documentation |
This function simulates multivariate crop yield data using a time-varying copula combined with Bayesian Structural Time Series (BSTS) models without GEV covariates for comparision.
simul.fun.noGEV(
nsim = 100,
n_train,
n_test,
copula,
init_params,
fn,
U_train,
Z_train,
Z_test,
X_train,
X_test,
Y_test,
BSTS_list
)
nsim |
Integer, number of simulation replications. |
n_train |
Integer, number of training observations. |
n_test |
Integer, number of test observations. |
copula |
Character, specifying the copula type: "Clayton", "Frank", "Gumbel", "Joe", or "Gaussian". |
init_params |
Numeric vector, initial parameter values for optimization. |
fn |
Function, log-likelihood function for parameter estimation. |
U_train |
Numeric matrix (n_train x D), pseudo-observations for the copula. |
Z_train |
Numeric array (n_train x D x M), observed data for each margin and sub-feature. |
Z_test |
Numeric array (n_test x D x M), observed data for each margin and sub-feature. |
X_train |
Numeric matrix (n_train x M), risk factors for the dynamic copula parameter. |
X_test |
Numeric matrix (n_test x M), risk factors for the dynamic copula parameter. |
Y_test |
Numeric matrix (n_test x D), true future values for MSE calculation. |
BSTS_list |
List of length D, each element is a BSTS model for a different margin. |
A list containing:
optim_results |
Results from the optimization process. |
theta_sim |
Simulated copula parameters across replications. |
Y_sim |
Simulated final BSTS-based forecasts. |
MSE |
Mean squared error for each simulation run. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.