by Van Huong Le1, Rodrigo Vargas1
1Department of Plant and Soil Sciences, University of Delaware, Newark, DE, 19716, USA
Corresponding author affiliation and e-mail:
Rodrigo Vargas
Department of Plant and Soil Sciences, University of Delaware, Newark, DE, 19716, USA
This repository contains the source code for different sampling methods: Fixed sampling, conditioned Latin Hypercube Sampling (cLHS), and autocorrelated conditioned Latin Hypercube Sampling (acLHS). Predictions are based using a Bernstein copula-based stochastic cosimulation (BCSCS) method. We provide two case studeies: first using a time series and the second for spatial applications.
- Data: this folder contains the data
- Functions: this folder contains the useful functions
- Scripts: this folder contains the scripts
- Results: this folder contains the results
- RProject_acLHS_1D.Rproj: This file is the R Project
- Data: this folder contains the data
- Functions: this folder contains the useful functions
- Scripts: this folder contains the scripts
- Results: this folder contains the results
- RProject_acLHS_2D.Rproj: This file is the R Project
The code has been tested using packages of:
-
R version 4.2.1
-
RStudio 2022.07.1
Opening the project RProject_acLHS_1D.Rproj
with Rstudio. Then open all the scripts in the "scripts" folder. The scripts are run in the following order: 0_Getting_Started.R, 1_Exploratory_data_analysis.R, 2_Variogram_analysis.R, 3_Sampling_Design.R, 4_Simulations.R.
- 0_Getting_Started.R: this script is for installing and loading R packages, and also loading functions from the functions folder.
- 1_Exploratory_data_analysis.R: this script is for exploring and calculating univariate statistical properties and dependency relationships between variables.
- 2_Variogram_analysis.R: this script is to explore the temporal or spatial distribution of the variable of interest and calculate its autocorrelation function.
- 3_Sampling_Design.R: this script is for applying sampling methods based on the data.
- 4_Simulations.R: this script is to model the characteristic functions of the variables and perform the simulation.
Opening the project RProject_acLHS_2D.Rproj
with Rstudio. Then open all the scripts in the "scripts" folder. The scripts are run in the following order: 0_Getting_Started.R, 1_Exploratory_data_analysis.R, 2_Variogram_analysis.R, 3_Sampling_Design.R, 4_Simulations.R.
- 0_Getting_Started.R: this script is for installing and loading R packages, and also loading functions from the functions folder.
- 1_Exploratory_data_analysis.R: this script is for exploring and calculating univariate statistical properties and dependency relationships between variables.
- 2_Variogram_analysis.R: this script is to explore the temporal or spatial distribution of the variable of interest and calculate its autocorrelation function.
- 3_Sampling_Design.R: this script is for applying sampling methods based on the data.
- 4_Simulations.R: this script is to model the characteristic functions of the variables and perform the simulation.
MIT License
Copyright (c) 2022 Van Huong Le, Rodrigo Vargas