logisticpost: Log posterior for a binary response model with a logistic...

Description Usage Arguments Value Author(s) Examples

View source: R/logisticpost.R

Description

Computes the log posterior density of (beta0, beta1) when yi are independent binomial(ni, pi) and logit(pi)=beta0+beta1*xi and a uniform prior is placed on (beta0, beta1)

Usage

1

Arguments

beta

vector of parameter values beta0 and beta1

data

matrix of columns of covariate values x, sample sizes n, and number of successes y

Value

value of the log posterior

Author(s)

Jim Albert

Examples

1
2
3
4
5
6
x = c(-0.86,-0.3,-0.05,0.73)
n = c(5,5,5,5)
y = c(0,1,3,5)
data = cbind(x, n, y)
beta=c(2,10)
logisticpost(beta,data)

LearnBayes documentation built on May 20, 2017, 2:24 a.m.

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

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

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

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