From e5bf27b9c8f45af0e1df2ff5a72e8fbef7ae4391 Mon Sep 17 00:00:00 2001 From: fmorgante Date: Wed, 29 May 2024 10:48:16 -0400 Subject: [PATCH] Fix some autoconversions --- R/mr_mash_rss_updates.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/mr_mash_rss_updates.R b/R/mr_mash_rss_updates.R index f554957..783d8d7 100644 --- a/R/mr_mash_rss_updates.R +++ b/R/mr_mash_rss_updates.R @@ -131,6 +131,7 @@ mr_mash_update_general_rss <- function(n, XtX, XtY, YtY, mu1_t, V, Vinv, ldetV, ##Compute expected residuals XtRbar <- XtY - XtX %*% mu1_t + XtRbar <- as.matrix(XtRbar) ##Update variational parameters, expected residuals, and ELBO components updates <- inner_loop_general_rss(n=n, XtX=XtX, XtY=XtY, XtRbar=XtRbar, mu1=mu1_t, V=V, Vinv=Vinv, w0=w0, S0=S0, @@ -145,6 +146,7 @@ mr_mash_update_general_rss <- function(n, XtX, XtY, YtY, mu1_t, V, Vinv, ldetV, if(compute_ELBO || update_V){ RbartRbar <- YtY - crossprod(mu1_t, XtY) - crossprod(XtY, mu1_t) + crossprod(mu1_t, XtX)%*%mu1_t + RbartRbar <- as.matrix(RbartRbar) } if(compute_ELBO && update_V){