log_prior: logarithm density for priors

View source: R/log_prior.R

log_priorR Documentation

logarithm density for priors

Description

A collection of log densities for common priors.

Usage

log_prior(B, priorArgs)

Arguments

B

"matrix". The paramter that need to be added with a prior. The prior density is calculated conditional on B. B should be always an one-column matrix,

priorArgs

"list". when priorArgs$prior_type: is set to "mvnorm", you have to provide priorArgs$mean: "matrix", the mean of parameter, mu0 should be always an one-column matrix; priorArgs$covariance: "matrix", the covariance matrix. A g-prior can be constructed by setting it to X'X, where X is the covariates matrix.; priorArgs$shrinkage: "numeric", the shrinkage for the covariance.

Details

The parameters after "..." should be matched exactly.

Value

"scalor". The log density of priors.

Note

First version: Tue Mar 30 09:33:23 CEST 2010; Current: Wed Sep 15 14:39:01 CEST 2010.

DEPENDS: mvtnorm::dmvnorm TODO:

Author(s)

Feng Li, Department of Statistics, Stockholm University, Sweden.


thiyangt/fformpp documentation built on Jan. 5, 2024, 5:44 a.m.