Description Usage Arguments Details Value Author(s) References See Also Examples
This function returns the posterior distribution of the average slope of the Bernstein polynomial regression function over a given interval.
1 | aveslope(obj, a, b)
|
obj |
an object returned by the |
a |
lower bound for the interval on which to calculate the slope |
b |
upper bound for the interval on which to calculate the slope |
See A variable selection approach to Bayesian monotonic regression for details.
Returns a vector of average slopes for each MCMC iteration in obj
S. McKay Curtis
A variable selection approach to Bayesian monotonic regression.
1 2 3 4 5 6 7 8 9 | ## Not run:
data(childgrowth)
n.thin <- 10
n.bi <- n.thin*1000
n.iter <- n.thin*15000 + n.bi
out <- gibbsiso(childgrowth$day,childgrowth$height,m=40,nmc=n.iter,nbi=n.bi,thin=n.thin)
plot(density(aveslope(out,75,150)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.