dmom | R Documentation |
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.
dmomigmarg
returns the marginal density implied by a
MOM(x;tau*phi)*Invgamma(phi;a/2,b/2), pmomigmarg
its cdf.
Analogously demomigmarg
and demomigmarg
for
eMOM(x;tau*phi)*Invgamma(phi;a/2,b/2)
dmom(x, tau, a.tau, b.tau, phi=1, r=1, V1, baseDensity='normal', nu=3,
logscale=FALSE, penalty='product')
dimom(x, tau=1, phi=1, V1, logscale=FALSE, penalty='product')
demom(x, tau, a.tau, b.tau, phi=1, logscale=FALSE)
pmom(q, V1 = 1, tau = 1)
pimom(q, V1 = 1, tau = 1, nu = 1)
pemom(q, tau, a.tau, b.tau)
qmom(p, V1 = 1, tau = 1)
qimom(p, V1 = 1, tau = 1, nu = 1)
dmomigmarg(x,tau,a,b,logscale=FALSE)
pmomigmarg(x,tau,a,b)
demomigmarg(x,tau,a,b,logscale=FALSE)
pemomigmarg(x,tau,a,b)
x |
In the univariate setting, |
q |
Vector of quantiles. |
p |
Vector of probabilities. |
V1 |
Scale matrix (ignored if |
tau |
Prior dispersion parameter is |
a.tau |
If |
b.tau |
See |
phi |
Prior dispersion parameter is |
r |
Prior power parameter for MOM prior is |
baseDensity |
For |
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 |
penalty |
|
logscale |
For |
a |
The marginal prior on phi is IG(a/2,b/2) |
b |
The marginal prior on phi is IG(a/2,b/2) |
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.
dmomigmarg
returns the marginal density
p(x)= int MOM(x;0,tau*phi) IG(phi;a/2,b/2) dphi
Prior density, cumulative distribution function or quantile.
David Rossell
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. Journal of the American Statistical Assocation, 2012, 107, 649-660
See http://rosselldavid.googlepages.com for technical reports.
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.