B2Nsir: Bayesian analysis of the means of two Normal samples using SIR priors.
Description
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.
Usage
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
Value
none returned; the function produces several plots and prints some statistics.
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.
References
van Hulst, R. 2018. Evaluating Scientific Evidence. ms.
Examples
Run this code# NOT RUN {
data(bodytemp)
B2Nsir(temperature ~ gender, bodytemp)
# }
Run the code above in your browser using DataLab