msBP.test {msBP} | R Documentation |
Multiscale testing of group differences
Description
Performs multiscale hypothesis testing of difference in the distribution of two groups using msBP prior.
Usage
msBP.test(y, a, b, group, priorH0 = 0.5,
mcmc, maxScale = 5, plot.it = FALSE, ...)
Arguments
y |
The pooled sample of observations |
a , b |
Parameters of the msBP prior |
group |
Vector of size |
priorH0 |
Prior gues for the probability of H0 |
mcmc |
a list giving the MCMC parameters. It must include the
following integers: |
maxScale |
maximum scale of the binary trees. |
plot.it |
logical. If TRUE a plot of the posterior mean probability of H0 is produced |
... |
additional arguments to be passed. |
Value
a list containing
Ps |
a matrix with |
Ps |
the posterior mean probabilities of H0 for each scale. |
References
Canale, A. and Dunson, D. B. (2016), "Multiscale Bernstein polynomials for densities", Statistica Sinica, 26(3), 1175-1195.
Canale, A. (2017), "msBP: An R Package to Perform Bayesian Nonparametric Inference Using Multiscale Bernstein Polynomials Mixtures". Journal of Statistical Software, 78(6), 1-19.
Examples
set.seed(1)
y <- runif(100)
g <- c(rep(0,50), rep(1,50))
mcmc <- list(nrep = 5000, nb = 1000, ndisplay = 500)
## Not run:
test.res <- msBP.test(y, 5, 1, g, mcmc=mcmc, plot.it = TRUE)
## End(Not run)