update_Omega | R Documentation |
Update class covariances
update_Omega(beta, b, z, m, n_Omega_0, V_Omega_0)
beta |
[ |
b |
[ |
z |
[ |
m |
[ |
n_Omega_0 |
[ |
V_Omega_0 |
[ |
A matrix of updated covariance matrices for each class in columns.
N <- 100
b <- cbind(c(0, 0), c(1, 1))
Omega <- matrix(c(1, 0.3, 0.3, 0.5, 1, -0.3, -0.3, 0.8), ncol = 2)
z <- c(rep(1, N / 2), rep(2, N / 2))
m <- as.numeric(table(z))
beta <- sapply(
z, function(z) oeli::rmvnorm(n = 1, b[, z], matrix(Omega[, z], 2, 2))
)
update_Omega(
beta = beta, b = b, z = z, m = m,
n_Omega_0 = 4, V_Omega_0 = diag(2)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.