From 15c5dcc92afcba88677c3ebbae1a9d6627dbcaa6 Mon Sep 17 00:00:00 2001 From: "Simon P. Couch" Date: Mon, 27 Nov 2023 09:37:11 -0600 Subject: [PATCH] correct coefficients in `tidy.varest()` output (#1175) --- NEWS.md | 2 ++ R/vars-tidiers.R | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 2cc79ceef..910a8495c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,6 +8,8 @@ * Added support for columns `adj.r.squared` and `npar` in `glance()` method for objects outputted from `mgcv::gam()` (#1172). +* Corrected coefficients values in `tidy.varest()` output (#1174). + # broom 1.0.5 diff --git a/R/vars-tidiers.R b/R/vars-tidiers.R index 41d4bd3be..9de72de89 100644 --- a/R/vars-tidiers.R +++ b/R/vars-tidiers.R @@ -53,7 +53,7 @@ tidy.varest <- function(x, conf.int = FALSE, conf.level = 0.95, ...) { for (v in names(s$varresult)) { ret[[v]] <- as_tidy_tibble( - s$varresult[[1]]$coefficients, + s$varresult[[v]]$coefficients, new_names = c("estimate", "std.error", "statistic", "p.value") ) ret[[v]]$group <- v