View source: R/basic_functions.R
compute_beta_posterior_density | R Documentation |
Compute the posterior density of the coefficient function.
compute_beta_posterior_density(beta_sample, param)
beta_sample |
a matrix. Each row is a coefficient function computed from the posterior sample. |
param |
a list containing:
|
The posterior densities correponds to approximations of the marginal
posterior distribitions (of beta(t) for each t).
The sample is thinned in order to reduce the correlation and the
computational time of the function kde2d
.
An approximation of the posterior density on a two-dimensional grid
(corresponds to the result of the kde2d
function).
library(RColorBrewer)
data(data1)
data(param1)
data(res_bliss1)
param1$grids <- data1$grids
param1$p <- sapply(data1$grids,length)
param1$Q <- length(data1$x)
density_estimate <- compute_beta_posterior_density(res_bliss1$beta_sample,param1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.