View source: R/adstockDeriveAppend.R

Derives best adstock rate, based on lowest SSE, and adds the the original data.table.

1 | ```
adstock.DeriveAppend(data, y, x, lim = FALSE)
``` |

`data` |
data.frame that holds the data (independent and dependent) |

`y` |
Dependent variable e.g. Sales |

`x` |
Independent variable, of which we want to derive optimum adstock. Can be a vector of variables |

`lim` |
Numeric. Upper limit for adstock rate |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.