| .LogDensityFromHist | R Documentation |
The function does not normalize the density.
.LogDensityFromHist(
weights,
breaks,
background = mean(weights)/(length(weights) * 10),
dmu = function(x) rep(1, numberOfCases(x))
)
weights |
a value proportional to the density in a histogram |
breaks |
the breaks of the histogram in accending order. One more than weights. |
background |
a value to be added to ensure that the density is nowhere 0 and thus the log exists. |
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) |
a function that can be evaluated on the support of the underlying measure (given by dmu) and provides the a density at every point.
Other .DensitFromHist:
.DensityFromHist()
f = .LogDensityFromHist(1:5,0:5)
x = seq(-1,6,by=0.01)
plot(x,f(x),type="b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.