| priorOnK_spec {telescope} | R Documentation |
Specify prior on K.
Description
Obtain a function to evaluate the log prior
specified for K.
Usage
priorOnK_spec(
P = c("fixedK", "Unif", "BNB_111", "BNB_121", "BNB_143", "BNB_443", "BNB_943",
"Pois_1", "Pois_4", "Pois_9", "Geom_05", "Geom_02", "Geom_01", "NB_11", "NB_41",
"NB_91"),
K
)
Arguments
P |
A character indicating which specification should be used. See Details for suitable values. |
K |
A numeric or integer scalar specifying the fixed (if |
Details
The following prior specifications are supported:
-
"fixedK": K has the fixed value K (second argument). -
"Unif":K \simUnif[1,K], where the upper limit is given by K (second argument). -
"BNB_111":K-1 \simBNB(1,1,1), i.e.,K-1follows a beta-negative binomial distribution with parameters(1,1,1). -
"BNB_121":K-1 \simBNB(1,2,1), i.e.,K-1follows a beta-negative binomial distribution with parameters(1,2,1). -
"BNB_143":K-1 \simBNB(1,2,1), i.e.,K-1follows a beta-negative binomial distribution with parameters(1,4,3). -
"BNB_443":K-1 \simBNB(4,4,3), i.e.,K-1follows a beta-negative binomial distribution with parameters(4,4,3). -
"BNB_943":K-1 \simBNB(9,4,3), i.e.,K-1follows a beta-negative binomial distribution with parameters(9,4,3). -
"Pois_1":K-1 \simpois(1), i.e.,K-1follows a Poisson distribution with rate 1. -
"Pois_4":K-1 \simpois(4), i.e.,K-1follows a Poisson distribution with rate 4. -
"Pois_9":K-1 \simpois(9), i.e.,K-1follows a Poisson distribution with rate 9. -
"Geom_05":K-1 \simgeom(0.5), i.e.,K-1follows a geometric distribution with success probabilityp=0.5and densityf(x)=p(1-p)^x. -
"Geom_02":K-1 \simgeom(0.2), i.e.,K-1follows a geometric distribution with success probabilityp=0.2and densityf(x)=p(1-p)^x. -
"Geom_01":K-1 \simgeom(0.1), i.e.,K-1follows a geometric distribution with success probabilityp=0.1and densityf(x)=p(1-p)^x. -
"NB_11":K-1 \simnbinom(1,0.5), i.e.,K-1follows a negative-binomial distribution withsize=1andp=0.5. -
"NB_41":K-1 \simnbinom(4,0.5), i.e.,K-1follows a negative-binomial distribution withsize=4andp=0.5. -
"NB_91":K-1 \simnbinom(9,0.5), i.e.,K-1follows a negative-binomial distribution withsize=9andp=0.5.
Value
A named list containing:
-
"log_pK": a function of the log prior ofK. -
"param": a list with the parameters.