###############################################################################
###############################################################################
###############################################################################
Anisotropic Multidimensional Smoothing Using Bayesian Tensor Product P-splines
###############################################################################
###############################################################################
###############################################################################

In this readme file we briefly describe the content of the supplementary zip-folder "RCode".

###############################################################################

The folder contains one R project file "AnisotropicSmoothing.Rproj" and the following five R scripts:

1) "MainFunctions.R" contains the main functions (e.g. an implementation of the MCMC sampler introduced in Section 3 of the manuscript).
2) "TestFunctions.R" contains two examples where we test the main functions from "MainFunctions.R". 
3) "SimulationStudy.R" contains the code for the simulation study (Section 5.1 in the manuscript).
4) "RealDataExample.R" contains the code for the temperature data example (Section 5.2 in the manuscript).
5) "USprecipitation.R" contains the code for the precipitation data example (Appendix G in the supplement).

##############################################################################

To get started, we recommend to proceed as follows: 

1. Open the R-project file "AnisotropicSmoothing.Rproj" to set the working directory correctly.
2. Open the script "MainFunctions.R" and run the whole script.
3. Open the script "TestFunctions.R" and go through the two examples.

##############################################################################



