B2Nsir function

Bayesian analysis of the means of two Normal samples using SIR priors.

Bayesian analysis of the means of two Normal samples using SIR priors.

Produces exploratory plots (boxplots and, if the sample sizes are equal), a quantile-quantile plot of the two samples. Also produces Bayesian posterior densities of the two sample means and of the difference between the means. The priors used are standard improper reference priors.

B2Nsir(formula, data, var.equal = TRUE, alpha = 0.05, plotit = TRUE, r = 10000)

Arguments

  • formula: the standard formula interface: response ~ factor
  • data: a data.frame containing the response and the two-level factor
  • var.equal: if TRUE the group variances are assumed to be equal, if FALSE two separate group variances are estimated
  • alpha: 1 - level of credibility, so that for alpha = 0.05 (the default) credible intervals will have 95% credibility
  • plotit: should plots be produced?
  • r: the number of samples from the posterior distribution; can usually be left at its default value of 10000

Details

Note that in the first plot the second sub-plot is NOT a normality plot but a quantile-quantile plot that compares the observations in the two groups.

Returns

none returned; the function produces several plots and prints some statistics.

References

van Hulst, R. 2018. Evaluating Scientific Evidence. ms.

See Also

BnNsir

t.test

Examples

data(bodytemp) B2Nsir(temperature ~ gender, bodytemp)
  • Maintainer: Robert van Hulst
  • License: GPL (>= 2)
  • Last published: 2018-05-15

Useful links