Computes the Baysian p-values for the test concerning all coefficients/parameters:
For \(p = 1,...,P\)
\(H_0:\theta_{j,k}^{p,q}=0\)
\(H_1:\theta_{j,k}^{p,q} \neq 0\)
The two-sided P-value for the sample outcome is obtained by first finding the one sided P-value, \(min(P(\theta_{j,k}^{p,q}<0),P(\theta_{j,k}^{p,q}>0 ))\) which can be estimated from posterior samples. For example, \(P(\theta_{j,k}^{p,q}>0) = \frac{n_+}{n}\), where \(n_+\) is the number of posterior samples that are greater than 0, \(n\) is the target sample size. The two sided P-value is \(P_\theta(\theta_{j,k}^{p,q}) = 2*min(P(\theta_{j,k}^{p,q}<0),P(\theta_{j,k}^{p,q}>0 ))\).
If there are \(\theta_{j,k_1}^{p,q},\theta_{j,k_2}^{p,q},...,\theta_{j,k_J}^{p,q}\) 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:
\(H_0:\theta_{j,k_1}^{p,q} = \theta_{j,k_2}^{p,q} = \cdots = \theta_{j,k_J}^{p,q}=0\)
\(H_1\) : some \(\theta_{j,k_j}^{p,q} \neq 0\)
Let \(\theta_{j,k_{min}}^{p,q}\) and \(\theta_{j,k_{max}}^{p,q}\) denote the coefficients with the smallest and largest posterior mean. Then the overall P-value is defined as
\(min(P_\theta (\theta_{j,k_{min}}^{p,q}), P_\theta(\theta_{j,k_{max}}^{p,q}))\).