summarize_beta: Compute posterior mean and 95% credible interval for...

View source: R/summarize_beta.R

summarize_betaR Documentation

Compute posterior mean and 95% credible interval for evaluations of each coefficient function.

Description

Given an array of posterior samples of coefficient function evaluations, returns the posterior mean and 95% credible interval for each evaluation.

Usage

summarize_beta(beta_samples)

Arguments

beta_samples

An array, returned by VCBART_ind, VCBART_cs, or predict_betas of posterior samples of coefficient function evaluations

Value

An array of size N x 3 x p where N is the number of inputs at which the coefficient functions are evaluated (i.e. N = dim(beta_samples)[2]) and p is the total number of coefficient functions including the intercept (i.e. p = dim(beta_samples)[3]). The j-th slice is an N x 3 matrix where the columns correspond to the posterior mean, 2.5% quantile, and 97.5% quantile of each evaluation of the (j-1)-th coefficient function. Note the effect of predictor X_j (i.e., \beta_{j}(Z) is the (j+1)-st coefficient function.


VCBART documentation built on April 21, 2026, 9:07 a.m.