weighted_mean_multivariate | R Documentation |
Calculation of weighted mean when the target is multivariate
weighted_mean_multivariate(matrix, weights, inverse_sum_weights)
matrix |
an (m x n) matrix where the ith row is the ith sample |
weights |
list of m matrices of the same dimension (n x n) |
inverse_sum_weights |
the inverse of the sum of the weights (can be calculated by passing in weights to inverse_sum_matrices) |
proposal mean vector
m1 <- matrix(c(1,2,3,4), nrow = 2, ncol = 2) m2 <- matrix(c(5,6,7,8), nrow = 2, ncol = 2) m3 <- matrix(c(9,10,11,12), nrow = 2, ncol = 2) X <- matrix(c(1,2,3,4,5,6), nrow = 3, ncol = 2) weighted_mean_multivariate(matrix = X, weights = list(m1, m2, m3), inverse_sum_weights = inverse_sum_matrices(list(m1, m2, m3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.