Learn R Programming

mombf (version 3.5.4)

priorp2g: Moment and inverse moment prior elicitation

Description

priorp2g finds the g value giving priorp prior probability to the interval (-q,q).

Usage

priorp2g(priorp, q, nu=1, prior=c("iMom", "normalMom", "tMom"))

Value

priorp2g returns g giving priorp prior probability to the interval (-q,q).

Arguments

prior

prior=='normalMom' does computations for the normal moment prior, prior=='tMom' for the T moment prior, prior=='iMom' does computations for the inverse moment prior. Currently prior=='tMom' is not implemented in priorp2g.

q

priorp2g returns g giving priorp prior probability to the interval (-q,q).

nu

Prior degrees of freedom for the T moment prior or the iMom prior (ignored if prior=='normalMom').

priorp

priorp2g returns g giving priorp prior probability to the interval (-q,q)

Author

David Rossell rosselldavid@gmail.com

Details

See pmom and pimom for the MOM/iMOM cumulative distribution functions.

References

See http://rosselldavid.googlepages.com for technical reports.

See Also

pmom, pimom

Examples

Run this code
data(hald)
lm1 <- lm(hald[, 1] ~ hald[, 2] + hald[, 3] + hald[, 4] + hald[, 5])

#find g value giving 0.05 probability to interval (-.2,.2)
priorp <- .05; q <- .2
gmom <- priorp2g(priorp=priorp, q=q, prior='normalMom')
gimom <- priorp2g(priorp=priorp, q=q, prior='iMom')
gmom
gimom

Run the code above in your browser using DataLab