getPrior_mu {eggCounts} R Documentation

## Get prior parameters from Gamma distribution

### Description

Compute the shape and rate parameters from a Gamma distribution for \mu based on some prior belief about its cumulative distribution function.

### Usage

getPrior_mu(x, px, y, py, s1 = 1, s2 = 0.001, plot = TRUE)


### Arguments

 x,px,y,py numeric. Threshold of some prior belief about true epg. There is px probability that the true epg is below x, and there is py probability that the true epg is below y. s1,s2 numeric. Starting values. plot logical. If TRUE, the prior distribution is plotted after parameters are found.

### Details

multiroot function from rootSolve package is used to compute the parameters.

### Value

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

### Examples

# 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)


[Package eggCounts version 2.3-2 Index]