weightedVariance: Compute the weighted variance of the particles.

Description Usage Arguments Value See Also

View source: R/RcppExports.R

Description

This SMC estimate of the variance can be used to scale the bandwidth of adaptive, Gaussian random walk Metropolis-Hastings proposals.

Usage

1
weightedVariance(particles, log_weights, mean)

Arguments

particles

npeaks * npart Matrix of parameter values for each particle.

log_weights

logarithms of the importance weights of each particle.

mean

Vector of weighted means of each particle.

Value

A vector of variances, one for each row.

See Also

wtd.var


serrsBayes documentation built on June 28, 2021, 5:14 p.m.