hmflatprobit {bayess} | R Documentation |
This random walk Metropolis-Hastings algorithm takes advantage of the
availability of the maximum likelihood estimator (available via the glm
function) to center and scale the random walk in an efficient manner.
hmflatprobit(niter, y, X, scale)
niter |
number of iterations |
y |
binary response variable |
X |
covariates |
scale |
scale of the random walk |
The function produces a sample of \beta
's of size niter
.
data(bank)
bank=as.matrix(bank)
y=bank[,5]
X=bank[,1:4]
flatprobit=hmflatprobit(1000,y,X,1)
mean(flatprobit[101:1000,1])