sibylhe / mmm_stan

Python/STAN Implementation of Multiplicative Marketing Mix Model, with deep dive into Adstock (carry-over effect), ROAS, and mROAS
MIT License
352 stars 162 forks source link

how to get adstock #35

Open xsmile10000 opened 3 years ago

xsmile10000 commented 3 years ago

Hello,thanks for your great work. I am learning this now. About the adstock, I ran the following code:

data=pd.DataFrame({"x":[100,100,100,100,100,100,100,100,100,100,100,100,100,100,100]}) L=4 P=1 D=0.8 x_adstocked = apply_adstock(data['x'].values, L, P, D)

Got these numbers:

array([ 26.58160553, 59.80861244, 86.39021797, 100. ,

  1. , 100. , 100. , 100. ,
  2. , 100. , 100. , 100. ,
  3. , 100. , 100. ])

My question is: Do these numbers are right adstock? or Is there any part i am missing? Thanks.