Learn R Programming

eggCounts (version 1.4)

fecr_probability: Compute the probability of the reduction parameter relative to the given threshold

Description

Computes the probability of the reduction parameter's marginal posterior density is less than (<), greater or equal to (>=) the threshold.

Usage

fecr_probability(stanFit, threshold = 0.95, 
  lessthan = TRUE)

Arguments

stanFit

A stanfit object from the output of fecr_stan()

threshold

numeric. The default threshold is 95% or 0.95.

lessthan

logical. If true, the probability less than the threshold is computed. Otherwise greater or equal to the threshold is computed. Default is TRUE.

Value

Returns the probability in percentage.

Examples

Run this code
# NOT RUN {
## load the sample data as a vector
data(epgs)

## apply zero-infation model to the data vector
model<-fecr_stan(epgs[,1],epgs[,2],rawCounts=FALSE,preCF=10,paired=TRUE,zeroInflation=TRUE)
fecr_probability(model$stan.samples)
# }

Run the code above in your browser using DataLab