I am trying to implement an AR (1) model in a Flux Script. To calculate the next forecasted value i need the previous value. The first implementation is working but doesn´t look good and is not very reusable.
I am looking for a function in Flux or a better way to calculate these values. I tried to get it done with “map()” or “reduce()”, but those functions limit me in some way, so it wasn’t possible.
While working with the reduce() function i tried to get an array as a “field” in the identity record. Int, float and strings work fine. Are arrays not supported?