Calculate Alpha number

Hi Richard.
Thanks again. I have tested the script and I get indeed the Alpha ,Beta and Gamma (ABG) taken from the whole time series.
Also the plot looks great.

If taken the same reprex into account from my previous , could the code be amended to show a table which shows the ABG per variable (rolling per +1 variables) ?

it would look something like this:
(numbers are example/figurative)

I am trying to get this: a table with alpha beta and gamma (rolling + 1): per variable.

sales1

A tibble: 3 41 x 4

Date	 	           sales	lagsales alpha beta	gamma

1 03-01-2017 40 NA NA
2 04-01-2017 2 40 NA
3 05-01-2017 2 2 0 0.5 2
4 06-01-2017 2 2 0 1 1
5 07-01-2017 30 2 0 2 3
6 08-01-2017 2 30 -2 0.3 5
7 01-02-2017 9 2 -4.44 1 0
8 02-02-2017 5 9 -1.48 2 1
9 03-02-2017 65 5 -0.0604 5
10 04-02-2017 3 65 -2.69 9 3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.