This git repo contains codes for computing Bayesian predictions using MCMC results from MCMC_legacy folder. The codes have 2 versions: one runs the prediction procedure locally; and the other one is for the Amazon cloud map-reduce procedure.
local version:
- step 1: invcor_generate_local.R: generate cholesky decomposition matrices for MCMC covariance matrices;
- step 2: predict_MCMC_meansd_chol_local.R: given MCMC results, prediction grids with covariates attached to make predictions locally.
cloud version: divide the prediction data into small files, so that each file can be used independently
- step 1: 1.invcor_generate_foreachtif_SOC.R: get the index of clusters needed for each small file (i.e. clusters which have data correlated with locations in small files);
- step 2: 2.invcor_generate.R and 3.seperate_chollist.R: generate cholesky decomposition matrices for MCMC covariance matrices for each small file;
- step 3: send data into cloud;
- step 4: run predict_MCMC_meansd_onenode_chol_SOC.R
Note: the data names need to be changed for predicting different soil property.
Author: Jiehua Chen [email protected]