Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Fitted Values chart - how to get values?

Dima1
7 - Meteor

Hi All

 

Could you pls advise how to get fitted values based on prediction of arima/ets model for input data? I dont need prediction, but only fitted using model. Thanks!

 

image.png

 

 

20 REPLIES 20
NeilR
Alteryx Alumni (Retired)

The group names are available to the R tool, as well:

AlteryxMessage(as.character(the.model$Name[1]))

 

NeilR
Alteryx Alumni (Retired)

If you're struggling with data frames (as I do from time to time), this article might help: Code Friendly Data Structures: Data Frames in R

 

cwkoops
8 - Asteroid

 

Thanks Neil.  That is a useful resource.  With an assist from a colleague, we got it figured out!

 

DesiredOutput.png

NeilR
Alteryx Alumni (Retired)

Thanks for sharing your final solution back to the community!

LinzHolroyd
5 - Atom

Thank you for sharing your solution. 

 

Is there a more efficient way to obtain the fitted values from the ARIMA model using the TS Model Factory macro?

 

The workflow worked well for 1012 records, but is taking a very long time to run for 4845 records. 

cwkoops
8 - Asteroid

So my solution worked for 16 months, until I upgraded to Alteryx 2020.2.3.22789 (using R.3.6.3).

 

See attached .yxzp. It gives me the following error: 

Error:  Error in data.frame(..., check.names = FALSE) :
Info: arguments imply differing number of rows: 0, 10
Info: Calls: cbind -> cbind -> data.frame

 

seemingly indicating my dataframe isn't a rectangle.  

 

In the R tool, if I change the cbind function to rbind, it seems to work, but would really like to get it to work as it originally did without having to transpose the output.  

amirmsaran
5 - Atom

@NeilR

 

Here is my workflow with the covariate forecast. 

NeilR
Alteryx Alumni (Retired)

Hi @amirmsaran,

 

Unlike the ETS and ARIMA tools, the TS Covariate Forecast tool outputs the predictions from its O output anchor (rather than an R model object). Therefore you don't need to use the R tool to get these predictions, you can see them with a Browse tool...

NeilR_0-1618593814271.png

 

amirmsaran
5 - Atom

Thanks @NeilR but I was wondering how I could get the fitted values for 2018-2020, prior to the forecast. I wanted to have that alongside the actual data.

NeilR
Alteryx Alumni (Retired)

It appears to me that the fitted values prior to the forecast are identical in the graphs for the ARIMA tool and the TS Covariate Forecast tool - it is just the forecast values that differ. So if you're after the fitted values, I would just connect the R tool to the ARIMA tool's O output anchor.

NeilR_0-1618594654515.png

 

Labels
Top Solution Authors