PMF.summary {bayesRecon}R Documentation

Returns summary of a PMF object

Description

Returns the summary (min, max, IQR, median, mean) of the PMF specified by pmf.

Usage

PMF.summary(pmf, Ltoll = .TOLL, Rtoll = .RTOLL)

Arguments

pmf

the PMF object.

Ltoll

used for computing the min of the PMF: the min is the smallest value with probability greater than Ltoll (default: 1e-15)

Rtoll

used for computing the max of the PMF: the max is the largest value with probability greater than Rtoll (default: 1e-9)

Value

A summary data.frame

See Also

PMF.get_mean(), PMF.get_var(), PMF.get_quantile(), PMF.sample()

Examples

library(bayesRecon)

# Let's build the pmf of a Binomial distribution with parameters n and p
n <- 10
p <- 0.6 
pmf_binomial <- apply(matrix(seq(0,10)),MARGIN=1,FUN=function(x) dbinom(x,size=n,prob=p))

# Print the summary of this distribution
PMF.summary(pmf=pmf_binomial)



[Package bayesRecon version 0.3.0 Index]