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 \sim
Unif[1,K]
, where the upper limit is given by K (second argument). -
"BNB_111"
:K-1 \sim
BNB(1,1,1), i.e.,K-1
follows a beta-negative binomial distribution with parameters(1,1,1)
. -
"BNB_121"
:K-1 \sim
BNB(1,2,1), i.e.,K-1
follows a beta-negative binomial distribution with parameters(1,2,1)
. -
"BNB_143"
:K-1 \sim
BNB(1,2,1), i.e.,K-1
follows a beta-negative binomial distribution with parameters(1,4,3)
. -
"BNB_443"
:K-1 \sim
BNB(4,4,3), i.e.,K-1
follows a beta-negative binomial distribution with parameters(4,4,3)
. -
"BNB_943"
:K-1 \sim
BNB(9,4,3), i.e.,K-1
follows a beta-negative binomial distribution with parameters(9,4,3)
. -
"Pois_1"
:K-1 \sim
pois(1), i.e.,K-1
follows a Poisson distribution with rate 1. -
"Pois_4"
:K-1 \sim
pois(4), i.e.,K-1
follows a Poisson distribution with rate 4. -
"Pois_9"
:K-1 \sim
pois(9), i.e.,K-1
follows a Poisson distribution with rate 9. -
"Geom_05"
:K-1 \sim
geom(0.5), i.e.,K-1
follows a geometric distribution with success probabilityp=0.5
and densityf(x)=p(1-p)^x
. -
"Geom_02"
:K-1 \sim
geom(0.2), i.e.,K-1
follows a geometric distribution with success probabilityp=0.2
and densityf(x)=p(1-p)^x
. -
"Geom_01"
:K-1 \sim
geom(0.1), i.e.,K-1
follows a geometric distribution with success probabilityp=0.1
and densityf(x)=p(1-p)^x
. -
"NB_11"
:K-1 \sim
nbinom(1,0.5), i.e.,K-1
follows a negative-binomial distribution withsize=1
andp=0.5
. -
"NB_41"
:K-1 \sim
nbinom(4,0.5), i.e.,K-1
follows a negative-binomial distribution withsize=4
andp=0.5
. -
"NB_91"
:K-1 \sim
nbinom(9,0.5), i.e.,K-1
follows a negative-binomial distribution withsize=9
andp=0.5
.
Value
A named list containing:
-
"log_pK"
: a function of the log prior ofK
. -
"param"
: a list with the parameters.