facebookexperimental / facebookexperimental/Robyn

robyn_response( ) immediate response = 0 for all times using Weibull adstock?

Open
#1,295 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.5k
Forks
433
PR merge metrics
No merged PRs in 30d

Description

Hi! I'm fairly new to Robyn and interested in calculating the decomposed immediate+carryover responses for paid media drivers during the training period of my model. My issue is that, for a given model and several metric, the immediate impact seems to be equal to zero at all times.

For example, in my model (trial 2, iteration 957.2) I am interested in the returns generated by a driver called 'ecommerce':

```
ecommerce_response <-
robyn_response(`
InputCollect = inputs,
OutputCollect = outputs,
select_model = "2_957_2",
metric_name = "ecommerce")

print(ecommerce_response$response_immediate)
```

Image

(This behavior seems to apply to many of the paid media drivers in my model, not just this one)

In my model, the 'ecommerce' response was fit using a Weibull PDF adstock, for which the estimated shape and scale parameters are 2.5 and 0.00832, respectively. My understanding is that for a Weibull PDF of this shape, _most_ of the density _should_ be to the right of x=0, suggesting that indeed the carryover will encapsulate most of the response and a _small_ immediate impact is not unexpected. However, _all_ continuous density functions obviously have the property that f(x) =0 at _any single point_, never mind the fact that this Weibull density asymptotically approaches zero from the right as x <- 0. I'm unsure how Robyn maps the domain of a Weibull function onto the discrete time axis used to describe lag/carryover effects, so this may also help to clarify.

Assuming that the weibull transformation is working correctly, it seems incorrect that the immediate impact could be equal to exactly zero. In any case, I'm having difficulty figuring out how Robyn defines the 'immediate' and 'carryover' components of a given response signal - if this is a feature and not a bug, would you kindly help me determine what 'immediate' means in this context, and how to understand the Weibull transformations happening inside the model?

Separately, if Robyn takes what I would call a 'narrow' view of what 'immediate' means (i.e., Y at time _t_ for only the simultaneous X at time _t_), then I would like to be able to redefine my own decompositions that are more appropriate for my business context--e.g., ones that define 'immediate' to include the current and subsequent K periods with 'carryover' being any residual response on further periods. In this case, I'm certain I will be relying upon the robyn_response( ) helper function heavily: Is it true that the robyn_response( ) function _does not_ conduct the underlying adstock transformations, as implied in a comment from this issue some time ago?
https://github.com/facebookexperimental/Robyn/issues/578#issuecomment-1361106020
If so, then this may help explain why my own robyn_response( ) outputs don't seem to make sense to me.

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.