dmom, dimom and demom return the density for the
moment, inverse moment and exponential moment priors.
pmom, pimom and pemom return the distribution function for the univariate
moment, inverse moment and exponential moment priors (respectively).
qmom and qimom return the quantiles for the univariate
moment and inverse moment priors.
In the univariate setting, x is a vector with the
values at which to evaluate the density. In the multivariate setting
it is a matrix with an observation in each row.
q
Vector of quantiles.
p
Vector of probabilities.
V1
Scale matrix (ignored if penalty=='product'). Defaults to 1 in univariate setting and
the identity matrix in the multivariate setting.
tau
Prior dispersion parameter is tau*phi. See
details.
a.tau
If tau is left missing, an Inverse Gamma(a.tau/2,b.tau/2)
is placed on tau. In this case dmom and demom return the density
marginalized with respect to tau.
b.tau
See a.tau.
phi
Prior dispersion parameter is tau*phi. See
details.
r
Prior power parameter for MOM prior is 2*r
baseDensity
For baseDensity=='normal' a normal MOM prior
is used, for baseDensity=='t' a T MOM prior with nu
degrees of freedom is used.
nu
Prior parameter indicating the degrees of freedom for the
quadratic T MOM and iMOM prior densities. The
tails of the inverse moment prior are proportional to the tails of a
multivariate T with nu degrees of freedom.
penalty
penalty=='product' indicates that product MOM/iMOM should
be used. penalty=='quadratic' indicates quadratic iMOM. See Details.
logscale
For logscale==TRUE, dimom returns the
natural log of the prior density.
Details
For type=='quadratic' the density is as follows.
Define the quadratic form q(theta)= (theta-theta0)' *
solve(V1) * (theta-theta0) / (tau*phi).
The normal moment prior density is proportional to
q(theta)*dmvnorm(theta,theta0,tau*phi*V1).
The T moment prior is proportional to
q(theta)*dmvt(theta,theta0,tau*phi*V1,df=nu).
The inverse moment prior density is proportional to
q(theta)^(-(nu+d)/2) * exp(-1/q(theta)).
pmom, pimom and qimom use closed-form expressions, while qmom uses
nlminb to find quantiles numerically.
Only the univariate version is implemented. In this case the product
MOM is equivalent to the quadratic MOM. The same happens for the
iMOM.
Only the product eMOM prior is implemented.
Value
dmom returns the value of the moment prior density.
dimom returns the value of the inverse moment prior density.
Author(s)
David Rossell
References
Johnson V.E., Rossell D. Non-Local Prior Densities for Default
Bayesian Hypothesis Tests. Journal of the Royal Statistical Society B,
2010, 72, 143-170.
Johnson V.E., Rossell D. Bayesian model selection in high-dimensional
settings. Technical report. 2011
See http://rosselldavid.googlepages.com for technical
reports.
See Also
g2mode to find the
prior mode corresponding to a given g. mode2g
to find the g value corresponding to a given prior mode.
Examples
#evaluate and plot the moment and inverse moment priors
library(mombf)
tau <- 1
thseq <- seq(-3,3,length=1000)
plot(thseq,dmom(thseq,tau=tau),type='l',ylab='Prior density')
lines(thseq,dimom(thseq,tau=tau),lty=2,col=2)