View source: R/adaptive_sampling.R
weighted_kde | R Documentation |
Performs weighted kernel density estimation for univariate data. This is useful for analyzing parameter distributions where each sample has an associated importance weight (e.g., a likelihood).
weighted_kde(x, weights, n = 512, from = min(x), to = max(x))
x |
A numeric vector of samples. |
weights |
A numeric vector of weights corresponding to each sample in x. |
n |
The integer number of points at which to evaluate the density. |
from , to |
The range over which to evaluate the density. |
A list containing the evaluation points (x
) and the estimated density values (y
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.