trendtest.MC.AR(before, after, iterations = 1000, r.scaleInt = 1, r.scaleSlp = 1, alphaTheta = 1, betaTheta = 5, progress = TRUE)Cauchy priors are placed on the standardized trend and intercept differences. The r.scaleInt and r.scaleSlp arguments
control the scales of these Cauchy priors, with r.scaleInt = 1 and r.scaleSlp = 1 yielding standard Cauchy priors.
A noninformative Jeffreys prior is placed on the variance of the random shocks of the auto-regressive process. A beta prior is
placed on the auto-correlation theta. The alphaTheta and betaTheta arguments control the form of this beta prior.
Missing data are handled by removing the locations of the missing data from the design matrix and error covariance matrix.
R code guide: http://drsmorey.org/research/rdmorey/
trendtest.Gibbs.AR, ttest.Gibbs.AR, ttest.MCGQ.AR
## Define data
data = c(87.5, 82.5, 53.4, 72.3, 94.2, 96.6, 57.4, 78.1, 47.2,
80.7, 82.1, 73.7, 49.3, 79.3, 73.3, 57.3, 31.7, 50.4, 77.8,
67, 40.5, 1.6, 38.6, 3.2, 24.1)
## Obtain log Bayes factors
logBFs = trendtest.MC.AR(data[1:10], data[11:25])
Run the code above in your browser using DataLab