compute_beta_sample {bliss}R Documentation

compute_beta_sample

Description

Compute the posterior coefficient function from the posterior sample.

Usage

compute_beta_sample(posterior_sample, param)

Arguments

posterior_sample

a list provided by the function Bliss_Gibbs_Sampler.

param

a list containing:

K

a vector of integers, corresponding to the numbers of intervals for each covariate.

grids

a numerical vector, the observation time points.

basis

a character (optional) among : "uniform" (default), "epanechnikov", "gauss" and "triangular" which correspond to different basis functions to expand the coefficient function and the functional covariates.

Q

an integer, the number of functional covariates.

p

a vector of integers, the numbers of time points of each functional covariate.

Value

a matrix containing the coefficient function posterior sample.

Examples

data(data1)
data(param1)
data(res_bliss1)
param1$grids <- data1$grids
param1$p <- sapply(data1$grids,length)
param1$Q <- length(data1$x)
beta_sample <- compute_beta_sample(posterior_sample=res_bliss1$posterior_sample,
                                   param=param1)

[Package bliss version 1.1.1 Index]