### BAYSPAR

BAYSPAR (BAYesian SPAtially-varying Regression) is a Bayesian calibration model for the TEX86 temperature proxy. There are two calibrations — one for sea-surface temperatures (SSTs) and one for subsurface (0-100 m) temperatures (subT) — and two methods to use to infer past temperatures. The "Standard" version of the model draws calibration parameters from the model gridpoint nearest to the core site to predict temperatures. The "Deep-Time" version searches the calibration dataset for coretop TEX86 values similar to those in the time series (within a user-set search tolerance) and uses the parameters from those analog locations to predict SSTs. The SST data in the calibration model are the statistical mean data from the World Ocean Atlas 2009. For further details, read the original publication in Geochimica et Cosmochimica Acta, and the updated calibration publication in Scientific Data. The MATLAB code is also available for downloading as .zip files: version 0 (TT2014, GCA) and version 1 (TT2015, Sci Data).

**Standard Instructions:**Enter or paste the depth or age data and TEX86 data. Enter the latitude and longitude of the core site. Click 'Load Defaults' to use default settings, or else manually enter values for: the prior standard deviation of SST (default=20; this value should be greater than the expected standard deviation); The maximum distance (in km) over which a prior mean for the SSTs is calculated (default=500); the minimum number of SST observations to use in the prior mean calculation (default=1); the number of iterations to perform (default=5000). Click "Include ensemble predictions" if you want to save all iterations in the output file (the default is to save the median, 5%, and 95% values). Select either “SST" or “subT."**Deep-Time Instructions:**Enter or paste the depth or age data and TEX86 data. Enter the paleolatitude and paleolongitude of the core site (these are only used in the figure plot). Enter the prior mean for the SSTs. Click 'Load Defaults' to use default settings, or else manually enter values for: The prior standard deviation (default=20); the search tolerance (default=twice the standard deviation of the inputted TEX86 data); the number of iterations to perform at each analog site (default=2000). Click "Include ensemble predictions" if you want to save all iterations in the output file. Select either “SST" or “subT.”**Outputs:**The program produces three plots:

1) A world map showing the location of the core site, the coretop TEX86 data, and the 20° X 20° regions from which the model parameters are drawn. For the standard application, only one region is used, whereas for the analog applications, typically multiple regions are used.

2) A plot of the predicted temperatures, with mean values in black and the 90% uncertainty intervals in blue. The prior mean is plotted as a dotted red line.

3) A plot of the prior and posterior temperature distributions, with the mean values removed. This demonstrates how informative the prior is. Ideally, the posterior distribution should be narrower than the prior, indicating that the data and model are informing the results more so than the prior. If the prior is the same width as the posterior, then the prior standard deviation may need to be increased.

In addition, a .csv file of the temperature timeseries data (with the 90% CI) is produced for downloading.

**Demos:**

The "Standard" demo calculates SSTs for a Late Quaternary dataset from the eastern Mediterranean Sea. Data are from: Castaneda et al. (2010), "Millennial-scale sea surface temperature changes in the eastern Mediterranean (Nile River Delta region) over the last 27,000 years," Paleoceanography vol. 25, PA1208.

The "Deep-Time" demo calculates SSTs for a dataset from Wilson Lake, New Jersey USA spanning the Paleocene-Eocene Thermal Maximum. Data are from: Zachos et al. (2006), "Extreme warming of mid-latitude coastal ocean during the Paleocene-Eocene Thermal Maximum: Inferences from TEX86 and isotope data," Geology vol. 34, pp. 737-740.

**Citation:**

Please cite the following papers when using BAYSPAR:

Jessica E. Tierney, Martin P. Tingley, A Bayesian, spatially-varying calibration model for the TEX86 proxy, Geochimica et Cosmochimica Acta, Volume 127, 15 February 2014, Pages 83-106.

Jessica E. Tierney, Martin P. Tingley. A TEX86 surface sediment database and extended Bayesian calibration, Scientific Data, Volume 2, 23 June 2015.