aveslope: Average slope of a Bernstein polynomial regression function

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/aveslope.r

Description

This function returns the posterior distribution of the average slope of the Bernstein polynomial regression function over a given interval.

Usage

1
aveslope(obj, a, b)

Arguments

obj

an object returned by the bisoreg function

a

lower bound for the interval on which to calculate the slope

b

upper bound for the interval on which to calculate the slope

Details

See A variable selection approach to Bayesian monotonic regression for details.

Value

Returns a vector of average slopes for each MCMC iteration in obj

Author(s)

S. McKay Curtis

References

A variable selection approach to Bayesian monotonic regression.

See Also

bisoreg

Examples

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)

bisoreg documentation built on June 25, 2018, 9:03 a.m.