mode2g {mombf} | R Documentation |
mode2g
finds the g
value corresponding to a
given prior mode.
g2mode
finds the prior mode corresponding
to a given g
value.
priorp2g
finds the g
value giving priorp
prior
probability to the interval (-q
,q
).
All routines operate in the standardized
effect sizes scale.
mode2g(prior.mode, prior = 'iMom', nu = 1, dim = 1) g2mode(g, prior = 'iMom', nu = 1, dim = 1) priorp2g(priorp, q, nu = 1, prior = 'iMom')
prior.mode |
Prior mode for the quadratic form q(theta)= (theta-theta0)' * V1^{-1} * (theta-theta0) / (n*g), where sigma is the dispersion parameter and Sigma is given by the design matrix. |
prior |
prior=='Mom' does computations for the moment
prior. prior=='iMom' does computations for the inverse moment
prior. |
nu |
Prior parameter (only used if prior=='iMom' ). |
dim |
Dimensionality of the parameter, i.e. dim==1 for
univariate, dim==2 for bivariate and so on. |
g |
Prior parameter. See dimom for details. |
priorp |
priorp2g returns g giving priorp prior
probability to the interval (-q,q) . |
q |
priorp2g returns g giving priorp prior
probability to the interval (-q,q) . |
See dmom
and dimom
for details on the meaning of the
prior parameters.
mode2g
returns the value of the prior
parameter g
matching the given mode.
g2mode
returns the prior mode for a given
prior parameter g
.
priorp2g
returns g giving priorp
prior
probability to the interval (-q,q)
.
David Rossell
See http://rosselldavid.googlepages.com for technical reports.
#find g value giving a prior mode for (theta/(sigma*n*Sigma))^2 at 0.2^2 data(hald) lm1 <- lm(hald[,1] ~ hald[,2] + hald[,3] + hald[,4] + hald[,5]) prior.mode <- .2 gmom <- mode2g(prior.mode^2,prior='Mom') gimom <- mode2g(prior.mode^2,prior='iMom') gmom gimom #find g value giving 0.05 probability to interval (-.2,.2) priorp <- .05; q <- .2 gmom <- priorp2g(priorp=priorp,q=q,prior='Mom') gimom <- priorp2g(priorp=priorp,q=q,prior='iMom') gmom gimom