Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

histprior

Density function of a histogram distribution


Description

Computes the density of a probability distribution defined on a set of equal-width intervals

Usage

histprior(p,midpts,prob)

Arguments

p

vector of values for which density is to be computed

midpts

vector of midpoints of the intervals

prob

vector of probabilities of the intervals

Value

vector of values of the probability density

Author(s)

Jim Albert

Examples

midpts=c(.1,.3,.5,.7,.9)
prob=c(.2,.2,.4,.1,.1)
p=seq(.01,.99,by=.01)
plot(p,histprior(p,midpts,prob),type="l")

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.