From b50509bd0c065bd4a1d87776da9db0f36ee54bce Mon Sep 17 00:00:00 2001 From: Herb Huang Date: Tue, 24 Jun 2025 16:00:51 -0500 Subject: [PATCH] fix(bug): add column names to returned unnamed matrix from mnormt::rmnorm --- semTools/R/monteCarloCI.R | 1 + 1 file changed, 1 insertion(+) diff --git a/semTools/R/monteCarloCI.R b/semTools/R/monteCarloCI.R index 858f98a..0514ffa 100644 --- a/semTools/R/monteCarloCI.R +++ b/semTools/R/monteCarloCI.R @@ -289,6 +289,7 @@ monteCarloCI <- function(object = NULL, expr, coefs, ACM, nRep = 2e4, ## Matrix of sampled values # dat <- samples <- data.frame(mnormt::rmnorm(n = nRep, mean = coefs, varcov = ACM)) + colnames(samples) <- names(coefs) ## Apply the expression(s) to VECTORS of ESTIMATES if (fast) { for (i in seq_along(expr)) {