nd2004: Compute Bayesian monotone regression function of Neelon and...

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

View source: R/nd2004.R

Description

Returns posterior draws from the monotone regression procedure of Neelon and Dunson (2004) using OpenBUGS

Usage

1
nd2004(x, y, M, n.sim = 5000, n.thin = 1, n.burn = 1000)

Arguments

x

predictor values

y

response values

M

number of knots

n.sim

number of MCMC iterations in the final MCMC sample (i.e., iterations kept after thinning and burn-in period)

n.thin

number of iterations to "thin" out of the MCMC chain after burn in

n.burn

number of iterations to burn

Details

Uses the openbugs function in the R2WinBUGS package to compute the posterior draws. The chains do not converge, however, as indicated by the poor Gelman-Rubin diagnostic.

Value

A bugs object.

Author(s)

S. McKay Curtis

References

Neelon, B. and Dunson, D.B. (2004). "Bayesian isotonic regression and trend analysis." Biometrics 60, 398–406.

See Also

openbugs

Examples

1
2
3
4
5
6
## Not run: 
data(childgrowth)
out <- nd2004(childgrowth$day, childgrowth$height, 10)
plot(out)

## End(Not run)

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