table.pvalues {BANOVA} | R Documentation |
Function to print the table of p-values
Description
Computes the Baysian p-values for the test concerning all coefficients/parameters:
For
The two-sided P-value for the sample outcome is obtained by first finding the one sided P-value, which can be estimated from posterior samples. For example,
, where
is the number of posterior samples that are greater than 0,
is the target sample size. The two sided P-value is
.
If there are representing J levels of a multi-level variable, we use a single P-value to represent the significance of all levels. The two alternatives are:
: some
Let and
denote the coefficients with the smallest and largest posterior mean. Then the overall P-value is defined as
.
Usage
table.pvalues(x)
Arguments
x |
the object from BANOVA.* |
Source
It borrows the idea of Sheffe F-test for multiple testing: the F-stat for testing the contrast with maximal difference from zero. Thank Dr. P. Lenk of the University of Michigan for this suggestion.
Examples
data(goalstudy)
library(rstan)
# or use BANOVA.run
res1 <- BANOVA.run(bid~progress*prodvar, model_name = "Normal",
data = goalstudy, id = 'id', iter = 1000, thin = 1, chains = 2)
table.pvalues(res1)