| find_pc_prior_param {makemyprior} | R Documentation |
Find suitable PC prior parameters
Description
Returns the U value in P(U > sigma) = alpha for a PC prior on standard deviation given an
equal-tailed credible interval
P(lower < func(x) < upper) = prob where x is a Gaussian variable with
zero mean standard deviation sigma.
Note that this function uses sampling.
Usage
find_pc_prior_param(
lower,
upper,
alpha = 0.05,
func = exp,
N = 10000,
prob = 0.95
)
Arguments
lower |
lower end of credible interval |
upper |
upper end of credible interval |
alpha |
tail probability of the PC prior (default = |
func |
function to scale Gaussian variables to match desired credible interval scale, default is the exponential function |
N |
number of samples to use when sampling sigma and x, default is |
prob |
amount of mass to put in the credible interval, default is |
Value
The U-value to pass to the PC prior. NB! Store result to avoid rerunning this function, as it uses sampling.
The function also prints (sampled) quantiles for the U-value that is returned.
Examples
find_pc_prior_param(0.1, 10)