Table 1:
Equations for DP | Line(s) | R code |
---|---|---|
Equation (12) |
108 – 110 | mean_p <- sig_p %*% (tau_y %*% sum_data + tauO %*% t(muO)) logp[c_i] <- log(n_k[c_i]) + dmvnorm(data[n,], mean = mean_p, sigma = sig_p + sigma_y, log = TRUE) |
Equation (13) |
117 – 118 | logp[ Nclust+1 ] >- log(alpha) + dmvnorm(data[n,] , mean mu0, sigma = sigma0 + sigma_y, log = TRUE) |