summaryDiff | R Documentation |
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.
summaryDiff(x, y, prob=c(0.025, 0.5, 0.975), cut=c(-2*log(9), 0), na.rm=TRUE)
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 |
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 |
Arnošt Komárek arnost.komarek@mff.cuni.cz
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.
set.seed(16336886)
x <- runif(100, 0, 100)
y <- runif(100, 0, 100)
sdiff <- summaryDiff(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.