This SMC estimate of the variance can be used to scale the bandwidth of adaptive, Gaussian random walk Metropolis-Hastings proposals.
weightedVariance(particles, log_weights, mean)
npeaks * npart
Matrix of parameter values for each particle.
logarithms of the importance weights of each particle.
Vector of weighted means of each particle.
A vector of variances, one for each row.