psimval: A Bayesian "p-value"

View source: R/Functions.R

psimvalR Documentation

A Bayesian "p-value"

Description

psimval finds a minimum alpha in the interval (0,1) such that the 1-alpha simultaneous confidence band excludes the vector of DF. This is intended to be a summary value for a joint hypothesis test of equality.

Usage

psimval(
  DF,
  DFmat,
  ialpha = 0.05,
  eps = 1e-04,
  typeband = c("sym", "asym", "OM")
)

Arguments

DF

the target vector needed to construct the confidence band

DFmat

the matrix of draws of the distribution, rows correspond to elements in DF

ialpha

a starting value of alpha to be searched on the interval (0,1)

eps

steps of the grid on the interval (0,1) to search

typeband

the type of confidence band to use: "sym" for simcnfB, "asym" for asymcnfB, or "OM" for jntCBOM are supported.

Value

alf the "p-value"

Examples

set.seed(14); m=matrix(rbeta(500,1,4),nrow = 5) + 1:5
(pval<- round(psimval(DF=rep(0.1,5),DFmat = m,ialpha=0.05,typeband="OM"),3))


estsyawo/bayesdistreg documentation built on Jan. 28, 2024, 12:13 p.m.