log_rho_univariate: Calculate the logarithm of rho (univariate)

View source: R/RcppExports.R

log_rho_univariateR Documentation

Calculate the logarithm of rho (univariate)

Description

Calculation of the log of rho acceptance probability or weight when target is univariate

Usage

log_rho_univariate(x, x_mean, time, precondition_values)

Arguments

x

vector of sampled sub-posterior values

x_mean

weighted mean of sampled sub-posterior values

time

time T for fusion algorithm

precondition_values

precondition values associated to each sub-posterior

Value

the logarithm of rho

Examples

x <- rnorm(4, 0, 1)
precondition_vals <- c(1, 2, 3, 4)
x_mean <- weighted_mean_univariate(x = x,
                                   weights = 1/precondition_vals)
log_rho_univariate(x = x,
                   x_mean = x_mean,
                   time = 0.5,
                   precondition_values = precondition_vals)

rchan26/hierarchicalFusion documentation built on Sept. 11, 2022, 10:30 p.m.