facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.08k stars 322 forks source link

Error in `mutate()`: ℹ In argument: `rsq = lares::winsorize(.data$rsq, thresh = c(0.01, 0.99))` #872

Closed caarolinagil closed 7 months ago

caarolinagil commented 7 months ago

Project Robyn

Describe issue

I get a error when I try to run de robyn_fun() function. After running 5 trials and 2000 iterations with weibul_pdf, this message appear:

Error in mutate(): ℹ In argument: rsq = lares::winsorize(.data$rsq, thresh = c(0.01, 0.99)). Caused by error in quantile.default(): ! missing values and NaN's not allowed if 'na.rm' is FALSE

Environment & Robyn version

Make sure you're using the latest Robyn version before you post an issue.

gufengzhou commented 7 months ago

@laresbernardo would you please check this one? thanks!

laresbernardo commented 7 months ago

It seems there is at least 1 value for R2 values that is missing (NA) there. Will add a quick fix by adding na.rm = TRUE to skip those, but probably a good idea to check why, how, and when this happens. Fix on the way...

caarolinagil commented 7 months ago

Yes, I think it's a good idea to check that because it's a rare case.

Okay, is the fix done on any version of Robyn??

Thanks a lot!

laresbernardo commented 7 months ago

@caarolinagil just landed in dev version v3.10.5.9008. Thanks for reporting it!