From 4f81ffc70da029fd75b9de61a64d4b0d571ff458 Mon Sep 17 00:00:00 2001 From: Gufeng Zhou Date: Tue, 1 Nov 2022 20:52:29 +0800 Subject: [PATCH] Fix: bug issue #520 fix --- R/DESCRIPTION | 2 +- R/R/model.R | 2 +- demo/demo.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/DESCRIPTION b/R/DESCRIPTION index a0387d1d3..61130e55a 100644 --- a/R/DESCRIPTION +++ b/R/DESCRIPTION @@ -1,7 +1,7 @@ Package: Robyn Type: Package Title: Semi-Automated Marketing Mix Modeling (MMM) from Meta Marketing Science -Version: 3.8.0 +Version: 3.8.1 Authors@R: c( person("Gufeng", "Zhou", , "gufeng@meta.com", c("aut")), person("Leonel", "Sentana", , "leonelsentana@meta.com", c("aut")), diff --git a/R/R/model.R b/R/R/model.R index 6edbbabbc..88f56e7fe 100644 --- a/R/R/model.R +++ b/R/R/model.R @@ -1051,7 +1051,7 @@ model_decomp <- function(coefs, dt_modSaturated, y_pred, dt_saturatedImmediate, xDecompOut <- cbind(data.frame(ds = dt_modRollWind$ds, y = y, y_pred = y_pred), xDecomp) ## Decomp immediate & carryover response - coefs_media <- coefs[rownames(coefs) == names(dt_saturatedImmediate), ] + coefs_media <- coefs[rownames(coefs) %in% names(dt_saturatedImmediate), ] mediaDecompImmediate <- data.frame(mapply(function(regressor, coeff) { regressor * coeff }, regressor = dt_saturatedImmediate, coeff = coefs_media)) diff --git a/demo/demo.R b/demo/demo.R index 0eb2665f4..5da2b5a61 100644 --- a/demo/demo.R +++ b/demo/demo.R @@ -4,7 +4,7 @@ # LICENSE file in the root directory of this source tree. ############################################################################################# -#################### Facebook MMM Open Source - Robyn 3.8.0 ###################### +#################### Facebook MMM Open Source - Robyn 3.8.1 ###################### #################### Quick guide ####################### #############################################################################################