summaryDiff {mixAK} | R Documentation |
Posterior summary statistics for a difference of two quantities
Description
It calculates (posterior) summary statistics for a difference of two quantities supplied as (MCMC) samples
Within mixAK
package it is primarily used to calculate posterior summary for the difference of the
deviances of two competing models.
Usage
summaryDiff(x, y, prob=c(0.025, 0.5, 0.975), cut=c(-2*log(9), 0), na.rm=TRUE)
Arguments
x |
a numeric vector with the sample of the first quantity. |
y |
a numeric vector with the sample of the second quantity to be subtracted from |
prob |
a numeric vector of probabilities for quantiles to be calculated from the sample of differences. |
cut |
numeric value(s) which specify the cutoff(s) we are interested in estimating
|
na.rm |
logical indicating on how to handle |
Value
A list with the components
summary |
a named vector with the (posterior) summary statistics based on the differences. |
Pcut |
estimated (posterior) probabilities that the difference
lies below the |
Author(s)
Arnošt Komárek arnost.komarek@mff.cuni.cz
References
Aitkin, M. (2010). Statistical Inference: An Integrated Bayesian/Likelihood Approach. Boca Raton: CRC Press.
Aitkin, M., Liu, C. C., and Chadwick, T. (2009). Bayesian model comparison and model averaging for small-area estimation. Annals of Applied Statistics, 3, 199-221.
Examples
set.seed(16336886)
x <- runif(100, 0, 100)
y <- runif(100, 0, 100)
sdiff <- summaryDiff(x, y)