View source: R/priorOnK_spec.R
| priorOnK_spec | R Documentation |
K.Obtain a function to evaluate the log prior
specified for K.
priorOnK_spec(
P = c("fixedK", "Unif", "BNB_111", "BNB_212", "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
)
P |
A character indicating which specification should be used. See Details for suitable values. |
K |
A numeric or integer scalar specifying the fixed (if |
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_212": K-1 \sim BNB(2,1,2), i.e., K-1 follows a beta-negative binomial distribution with parameters (2,1,2).
"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 probability p=0.5 and density f(x)=p(1-p)^x.
"Geom_02": K-1 \sim geom(0.2), i.e., K-1 follows a geometric distribution with success probability p=0.2 and density f(x)=p(1-p)^x.
"Geom_01": K-1 \sim geom(0.1), i.e., K-1 follows a geometric distribution with success probability p=0.1 and density f(x)=p(1-p)^x.
"NB_11": K-1 \sim nbinom(1,0.5), i.e., K-1 follows a negative-binomial distribution with size=1 and p=0.5.
"NB_41": K-1 \sim nbinom(4,0.5), i.e., K-1 follows a negative-binomial distribution with size=4 and p=0.5.
"NB_91": K-1 \sim nbinom(9,0.5), i.e., K-1 follows a negative-binomial distribution with size=9 and p=0.5.
A named list containing:
"log_pK": a function of the log prior of K.
"param": a list with the parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.