`mombf`

computes moment Bayes factors to test whether a subset of
regression coefficients are equal to some user-specified value.
`imombf`

computes inverse moment Bayes factors.
`zellnerbf`

computes Bayes factors based on the Zellner-Siow
prior (used to build the moment prior).

1 2 3 4 |

`lm1` |
Linear model fit, as returned by |

`coef` |
Vector with indexes of coefficients to be
tested. e.g. |

`g` |
Vector with prior parameter values. See |

`prior.mode` |
If specified, |

`baseDensity` |
Density upon which the Mom prior is
based. |

`nu` |
For |

`theta0` |
Null value for the regression coefficients. Defaults to 0. |

`logbf` |
If |

`method` |
Numerical integration method to compute the bivariate
integral (only used by |

`nquant` |
Number of quantiles at which to evaluate the integral
for known |

`B` |
Number of Monte Carlo samples to estimate the T Mom and the inverse moment
Bayes factor. Only used in |

These functions actually call `momunknown`

and
`imomunknown`

, but they have a simpler interface.
See `dmom`

and `dimom`

for details on the moment and inverse
moment priors.
The Zellner-Siow g-prior is given by dmvnorm(theta,theta0,n*g*V1).

`mombf`

returns the moment Bayes factor to compare the model where
`theta!=theta0`

with the null model where `theta==theta0`

. Large values favor the
alternative model; small values favor the null.
`imombf`

returns
inverse moment Bayes factors.
`zellnerbf`

returns Bayes factors based on the Zellner-Siow g-prior.

David Rossell

See http://rosselldavid.googlepages.com for technical reports. For details on the quantile integration, see Johnson, V.E. A Technique for Estimating Marginal Posterior Densities in Hierarchical Models Using Mixtures of Conditional Densities. Journal of the American Statistical Association, Vol. 87, No. 419. (Sep., 1992), pp. 852-860.

`momunknown`

,
`imomunknown`

and `zbfunknown`

for another interface to compute Bayes
factors. `momknown`

, `imomknown`

and `zbfknown`

to compute Bayes factors assuming that the dispersion parameter
is known, and for approximate Bayes factors for
GLMs. `mode2g`

for prior elicitation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
##compute Bayes factor for Hald's data
data(hald)
lm1 <- lm(hald[,1] ~ hald[,2] + hald[,3] + hald[,4] + hald[,5])
# Set g so that prior mode for standardized effect size is at 0.2
prior.mode <- .2^2
V <- summary(lm1)$cov.unscaled
gmom <- mode2g(prior.mode,prior='normalMom')
gimom <- mode2g(prior.mode,prior='iMom')
# Set g so that interval (-0.2,0.2) has 5% prior probability
# (in standardized effect size scale)
priorp <- .05; q <- .2
gmom <- c(gmom,priorp2g(priorp=priorp,q=q,prior='normalMom'))
gimom <- c(gmom,priorp2g(priorp=priorp,q=q,prior='iMom'))
mombf(lm1,coef=2,g=gmom) #moment BF
imombf(lm1,coef=2,g=gimom,B=10^5) #inverse moment BF
zellnerbf(lm1,coef=2,g=1) #BF based on Zellner's g-prior
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.