simult.pvalue {bayesSurv} | R Documentation

## Compute a simultaneous p-value from a sample for a vector valued parameter.

### Description

The p-value is computed as 1 - the credible level of the credible region which just cover the point (0, 0, ..., 0)'.

The function returns also the simultaneous credible region (rectangle) with a specified credible level.

### Usage

    simult.pvalue(sample, precision=0.001, prob=0.95)
    ## S3 method for class 'simult.pvalue':
    print(x, ...)

### Arguments

`sample` | a data frame or matrix with sampled values (one column = one parameter)
`precision` | precision with which the p-value is to be computed
`prob` | probability for which the credible region is to be computed
`x` | an object of class simult.pvalue
`...` | who knows

### Value

An object of class 'simult.pvalue'.

### Author(s)

Arnost Komarek arnost.komarek@med.kuleuven.be

### References

Besag, J., Green, P., Higdon, D. and Mengersen, K. (1995). Bayesian computation and stochastic systems (with Discussion). Statistical Science, 10, 3 - 66. page 30

Held, L. (2004). Simultaneous posterior probability statements from Monte Carlo output. Journal of Computational and Graphical Statistics, 13, 20 - 35.

### Examples

    m <- 1000
    sample <- data.frame(x1=rnorm(m), x2=rnorm(m), x3=rnorm(m))
    simult.pvalue(sample)

    sample <- data.frame(x1=rnorm(m), x2=rnorm(m), x3=rnorm(m, mean=2))
    simult.pvalue(sample)

    sample <- data.frame(x1=rnorm(m), x2=rnorm(m), x3=rnorm(m, mean=5))
    simult.pvalue(sample, prob=0.99, precision=0.0001)

[Package bayesSurv version 0.4 Index]