# 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

1 2 3 | ```
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)

Arnošt Komárek arnost.komarek[AT]mff.cuni.cz

### 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

1 2 3 4 5 6 7 8 9 | ```
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)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.