compute_beta_posterior_density {bliss} | R Documentation |
compute_beta_posterior_density
Description
Compute the posterior density of the coefficient function.
Usage
compute_beta_posterior_density(beta_sample, param)
Arguments
beta_sample |
a matrix. Each row is a coefficient function computed from the posterior sample. |
param |
a list containing:
|
Details
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
.
Value
An approximation of the posterior density on a two-dimensional grid
(corresponds to the result of the kde2d
function).
Examples
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)