combinationWithOutliers_Gauss: Bayesian modeling for combining Gaussian dates and handling...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/combinationWithOutliers.R

Description

Bayesian modeling for combining Gaussian dates with known variance and that may be outliers. These dates are assumed to be contemporaneous of the target date and have non identical distributions as the variance may be different for each date. The posterior distribution of the modeling is sampled by a MCMC algorithm implemented in JAGS.

Usage

1
2
3
4
combinationWithOutliers_Gauss(M, s, refYear=NULL, outliersIndivVariance, 
        outliersBernouilliProba, studyPeriodMin, studyPeriodMax, numberChains = 2, 
        numberAdapt = 10000, numberUpdate = 10000, variable.names = c("theta"), 
        numberSample = 50000, thin = 10)

Arguments

M

vector of measurement

s

vector of measurement errors

refYear

vector of year of reference for ages

outliersIndivVariance

vector of individual variance for delta[i]

outliersBernouilliProba

vector of Bernouilli probability for each date. Reflects a prior assumption that the date is an outlier.

studyPeriodMin

numerical value corresponding to the start of the study period in BC/AD format

studyPeriodMax

numerical value corresponding to the end of the study period in BC/AD format

numberChains

number of Markov chains simulated

numberAdapt

number of iterations in the Adapt period of the MCMC algorithm

numberUpdate

number of iterations in the Update period of the MCMC algorithm

variable.names

names of the variables whose Markov chains are kept

numberSample

number of iterations in the Acquire period of the MCMC algorithm

thin

step between consecutive iterations finally kept

Details

If there are Nbobs measurements M associated with their error s, the model is the following one :

Value

This function returns a Markov chain of the posterior distribution. The MCMC chain is in date format BC/AD, that is the reference year is 0. Only values for the variables defined by 'variable.names' are given.

Author(s)

Anne Philippe & Marie-Anne Vibet

References

Bronk Ramsey C., Dealing with outliers and offsets in Radiocarbon dating, Radiocarbon, 2009, 51:1023-45.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  data(sunspot)
  MCMC1 = combinationWithOutliers_Gauss(M=sunspot$Age[1:10], s= sunspot$Error[1:10], 
  refYear=rep(2016,10), outliersIndivVariance = rep(1,10), 
  outliersBernouilliProba=rep(0.2, 10), studyPeriodMin=800, studyPeriodMax=1500, 
  variable.names = c('theta'))
  plot(MCMC1)
  gelman.diag(MCMC1)
  
  # Influence of outliersIndivVariance
  MCMC2 = combinationWithOutliers_Gauss(M=sunspot$Age[1:10], s= sunspot$Error[1:10], 
  refYear=rep(2016,10), outliersIndivVariance = rep(10,10), 
  outliersBernouilliProba=rep(0.2, 10), studyPeriodMin=800, studyPeriodMax=1500, 
  variable.names = c('theta'))
  plot(MCMC2)
  gelman.diag(MCMC2)  

ArchaeoChron documentation built on May 2, 2019, 9:13 a.m.