hmflatprobit | 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
.
hmflatlogit
data(bank)
bank=as.matrix(bank)
y=bank[,5]
X=bank[,1:4]
flatprobit=hmflatprobit(1000,y,X,1)
mean(flatprobit[101:1000,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.