getPrior_mu {eggCounts} | R Documentation |
Compute the shape and rate parameters from a Gamma distribution for \mu
based on some prior belief about its cumulative distribution function.
getPrior_mu(x, px, y, py, s1 = 1, s2 = 0.001, plot = TRUE)
x,px,y,py |
numeric. Threshold of some prior belief about true epg. There is |
s1,s2 |
numeric. Starting values. |
plot |
logical. If TRUE, the prior distribution is plotted after parameters are found. |
multiroot
function from rootSolve package is used to compute the parameters.
Returns Gamma prior parameters for \mu
and the printed argument to use in a fecr_stan()
or a fec_stan()
function call.
Tea Isler
Craig Wang
# there is 30% probability that the mean epg is less than 200
# and 80% probability that the mean epg is less than 500
getPrior_mu(x = 200, px = 0.3, y = 500, py = 0.8)