Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

reg.gprior.post

Computes the log posterior of a normal regression model with a g prior.


Description

Computes the log posterior of (beta, log sigma) for a normal regression model with a g prior with parameters beta0 and c0.

Usage

reg.gprior.post(theta, dataprior)

Arguments

theta

vector of components of beta and log sigma

dataprior

list with components data and prior; data is a list with components y and X, prior is a list with components b0 and c0

Value

value of the log posterior

Author(s)

Jim Albert

Examples

data(puffin)
data=list(y=puffin$Nest, X=cbind(1,puffin$Distance))
prior=list(b0=c(0,0), c0=10)
reg.gprior.post(c(20,-.5,1),list(data=data,prior=prior))

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.