nd2004: Compute Bayesian monotone regression function of Neelon and Dunson (2004)
Description
Returns posterior draws from the monotone regression procedure of Neelon and Dunson (2004) using OpenBUGS
Usage
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
Value
A bugs object.
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.
References
Neelon, B. and Dunson, D.B. (2004). "Bayesian isotonic regression and trend analysis." Biometrics 60, 398--406.