Function to extract estimated contour probabilities of a particular effect estimated with
Psplines using Markov chain Monte Carlo (MCMC) estimation techniques. Note that, the contour
probability option must be specified within function sx
, see the example.
1 
object 
an object of class 
model 
for which model the contour probabilities should be provided, either an integer or a
character, e.g. 
term 
if not 
... 
not used. 
Nikolaus Umlauf, Thomas Kneib, Stefan Lang, Achim Zeileis.
Brezger, A., Lang, S. (2008): Simultaneous probability statements for Bayesian Psplines. Statistical Modeling, 8, 141–186.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  ## Not run:
## generate some data
set.seed(111)
n < 500
## regressor
dat < data.frame(x = runif(n, 3, 3))
## response
dat$y < with(dat, 1.5 + sin(x) + rnorm(n, sd = 0.6))
## estimate model
## need to set the contourprob option,
## otherwise BayesX will not calculate probabilities
## see also the reference manual of BayesX available
## at www.BayesX.org
b < bayesx(y ~ sx(x, bs = "ps", contourprob = 4), data = dat)
## extract contour probabilities
cprob(b, term = "sx(x)")
## End(Not run)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.