View source: R/adaptive_sampling.R
calculate_weighted_marginals | R Documentation |
Calculates the marginal probability distribution for each model parameter. The distributions are weighted by the likelihood of each sample, making this useful for identifying the most probable parameter values from a set of Monte Carlo samples.
calculate_weighted_marginals(samples)
samples |
A data frame containing parameter samples (e.g., |
This function uses the weighted_kde
helper to perform kernel density
estimation for each parameter, with weights derived from the normalized
likelihoods of the samples.
A named list where each element is a density object (a list with x
and y
components) corresponding to a model parameter.
x |
Vector of parameter values |
y |
Vector of density estimates |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.