beta.params: Obtain the parameters of Generalized Beta (GB) prior...

Description Usage Arguments Value Examples

View source: R/beta.params.R

Description

This function calculates the parameters a and b from GB prior when l ≤ p ≤ u. The previous knowledge can consists in the mean and variance of p or the coefficient ε of impartiality.

Usage

1
beta.params(p, l, u, know_p)

Arguments

p

Vector of acceptance and rejection quality levels, p_alpha and p_beta

l

Upper limit of p

know_p

List containing the mean and variance of p or the coefficient ε of impartiality. In the case of impartiality, then Pr(p ≤ p_alpha)=Pr(p ≥ p_beta).

Value

A data.frame with the following variables of the parameters of GB prior

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
p<-c(0.00654, 0.0426)
l<- p[1]/5
u<- p[2]+(p[1]-l)

# knowledge of mean and variance of p distribution
know_p<-list(mean_p=p[1],var_p=((p[2]-p[1])/4)^2)
beta.params(p,l,u, know_p)

# knowledge of epsilon-impartiality of p distribution
know_p<-list(epsilon=0.2)
beta.params(p,l,u, know_p)

ULL-STAT/RepetPlan documentation built on Dec. 18, 2021, 5:15 p.m.