bayes.probit: Simulates from a probit binary response regression model...

Description Usage Arguments Value Author(s) Examples

Description

Gives a simulated sample from the joint posterior distribution of the regression vector for a binary response regression model with a probit link and a informative normal(beta, P) prior. Also computes the log marginal likelihood when a subjective prior is used.

Usage

1
bayes.probit(y,X,m,prior=list(beta=0,P=0))

Arguments

y

vector of binary responses

X

covariate matrix

m

number of simulations desired

prior

list with components beta, the prior mean, and P, the prior precision matrix

Value

beta

matrix of simulated draws of regression vector beta where each row corresponds to one draw

log.marg

simulation estimate at log marginal likelihood of the model

Author(s)

Jim Albert

Examples

1
2
3
4
5
6
response=c(0,1,0,0,0,1,1,1,1,1)
covariate=c(1,2,3,4,5,6,7,8,9,10)
X=cbind(1,covariate)
prior=list(beta=c(0,0),P=diag(c(.5,10)))
m=1000
s=bayes.probit(response,X,m,prior)


Search within the LearnBayes package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.