Learn R Programming

STCCGEV (version 1.0.0)

Conditional Copula Model for Crop Yield Forecasting

Description

Provides functions to model and forecast crop yields using a spatial temporal conditional copula approach. The package incorporates extreme weather covariates and Bayesian Structural Time Series models to analyze crop yield dependencies across multiple regions. Includes tools for fitting, simulating, and visualizing results. This method build upon established R packages, including 'Hofert' 'et' 'al'. (2025) , 'Scott' (2024) , and 'Stephenson' 'et' 'al'. (2024) .

Copy Link

Version

Install

install.packages('STCCGEV')

Version

1.0.0

License

MIT + file LICENSE

Maintainer

Yongkun Li

Last Published

March 27th, 2025

Functions in STCCGEV (1.0.0)

init_params_full_G

Initial Parameters for 2D Pseudo-Loglikelihood-Generalized Estimation
dynamic.theta.joe

Compute Dynamic Joe Copula Parameter
log_likelihood_generalized_2d

Generalized Log-Likelihood Function for 2D Copula-GEV Model
plot_forecast

Plot Observed Data and BSTS Forecast
init_params_full

Initial Parameters for 2D Pseudo-Loglikelihood Estimation
init_params_noGEV

Initial Parameters for 2D Pseudo-Loglikelihood Estimation without GEV models for covariates
time_train

1950-2003
joe.theta

Compute Joe Copula Parameter from Kendall's Tau
medoid_names

list containing Dufferin and Wellington
time_all

1950-2022
n_test

19
time_test

2004-2022
simul_fun_generalized_2d

A Special Case of simulation_generalized in 2 Dimensions
simulation_generalized

Simulate Multivariate Crop Yield Data Using a Generalized Copula-GEV-BSTS Model
xx_all

Maximized Covariates Matrix for Crop Yield Forecasting
xx_test

Maximized Covariates Matrix for Crop Yield Forecasting
zz_all

Standardized Covariates Array for Crop Yield Forecasting
uu

Pseudo-Observations of BSTS Residuals for Crop Yield Forecasting
yy_all

Crop Yield Data
xx_train

Maximized Covariates Matrix for Crop Yield Forecasting
zz_test

Standardized Covariates Array for Crop Yield Forecasting
zz_train

Standardized Covariates Array for Crop Yield Forecasting
log_likelihood_Generalized

Compute Log-Likelihood for a Generalized Dynamic Copula-GEV Model
simul.fun.noGEV

Simulate Multivariate Crop Yield Data Using a Generalized Copula-BSTS Model Without GEV Covariates
plot_forecast_compare

Compare Forecasts from Two Models
yy_train

Crop Yield Data for Training in BSTS Models
yy_test

Crop Yield Data for Testing in BSTS Models
dynamic.theta.frank

Compute Dynamic Frank Copula Parameter
GH.theta

Compute Gumbel Copula Parameter from Kendall's Tau
dynamic.theta.gumbel

Compute Dynamic Gumbel Copula Parameter
copula_list

Supported copula types
dynamic.rho

Compute Dynamic Gaussian Copula Correlation Parameter (rho)
cropyields_covariates

Data of the article "Probabilistic Crop Yields Forecasts With Spatio-Temporal Conditional Copula Using Extreme Weather Covariates"
fit_bsts

Fit a Bayesian Structural Time Series (BSTS) Model
frank.theta

Compute Frank Copula Parameter from Kendall's Tau
clayton.theta

Compute Clayton Copula Parameter from Kendall's Tau
dynamic.theta.clayton

Compute Dynamic Clayton Copula Parameter
log_likelihood_noGEV

Compute Log-Likelihood for a Generalized Dynamic Copula Model without GEV covariates
n_train

54