dot-DensityFromHist: Compute the density relativ to a measure from histogram...

.DensityFromHistR Documentation

Compute the density relativ to a measure from histogram weights.

Description

The function does not normalize the density.

Usage

.DensityFromHist(
  weights,
  breaks,
  background = 0,
  dmu = function(x) rep(1, numberOfCases(x))
)

Arguments

weights

a value proportional to the density in a histogram

breaks

the breaks of the histogram in accending order. One more than weights.

background

the value for the density to be chosen outside of break range.

dmu

a vectorized function representing the Lebesgue density of the measure relativ to which the density should be valid. The default computes Lebesgue densities (probability density functions, PDFs)

Value

a function that can be evaluated on the support of the underlying measure (given by dmu) and provides the a density at every point.

See Also

Other .DensitFromHist: .LogDensityFromHist()

Examples

f = .DensityFromHist(1:5,0:5)
x = seq(-1,6,by=0.01)
plot(x,f(x),type="b")


DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.