How can "Time Series" get the forecast data without showing the graph?The following time series analysis is carried out according to "difference" and "ARIMA".Obtain the prediction data and save the prediction formula.
How to use JSL to realize the time series analysis without displaying the graph window and get the forecast data directly?
Thanks!
dt = Open( "$SAMPLE_DATA/Time Series/Monthly Sales.jmp" );
TS=Time Series(
Y( :Sales ),
Difference( 1, 0, 1 ),
ARIMA( 0, 1, 0 ),
SendToReport(
Dispatch( {"Model Comparison"}, "", ScrollBox, {Background Color( 117 )} )
)
);
TS << Save Prediction Formula;
Advanced Statistical ModelingRe: How can "Time Series" get the forecast data without showing the graph?Thank Jim!
Re: How can "Time Series" get the forecast data without showing the graph?- You need to set the TS pointer in the first line, not send a message to it, so you need to use "=" not "<<".
- Having 2 Arima requests appears to be causing a problem.
This code works for me
TS = Time Series( Y( :Sales ), Difference( 1, 0, 1 ));
TS << Arima( 0, 1, 0, Predicted( 1 ), Save Columns );
Re: How can "Time Series" get the forecast data without showing the graph?I follow the script guide code, the prediction data is not correct
TS << Arima( 1, 0, 0, Actual( 1 ), Save Columns );
And try to modify it this way, but no data is generated.
TS << Time Series( Y( :Sales ), Difference( 1, 0, 1 ), ARIMA( 0, 1, 0 ), Save Columns );
TS<< Arima( 0, 1, 0, Predicted( 1 ), Save Columns );
Re: How can "Time Series" get the forecast data without showing the graph?Re: How can "Time Series" get the forecast data without showing the graph?The following code can enter the window interface:
dt = Open( "$SAMPLE_DATA/Time Series/Monthly Sales.jmp" );
TS = Time Series(
//invisible,
Y( :Sales ),
Difference( 1, 0, 1 ),
ARIMA( 0, 1, 0 ),
SendToReport( Dispatch( {"Model Comparison"}, "", ScrollBox, {Background Color( 117 )} ) )
);
Re: How can "Time Series" get the forecast data without showing the graph?I searched and searched for community and scripting guides.
I try a variety of methods to get the same prediction data as manually saving the formula column in the window interface.
I look forward to the guidance of the experts.
Best regards.
Re: How can "Time Series" get the forecast data without showing the graph?I saved the prediction formula according to the code in the script guide, which is different from the data I saved in step 4 in the window interface.

I adjusted JSL for different parameters and did not get the result of windowing interface operation.
How to write JSL to get the same results as the window interface.
Thanks Experts!

Re: How can "Time Series" get the forecast data without showing the graph?Thank Jim!
dt = Open( "$SAMPLE_DATA/Time Series/Monthly Sales.jmp" );
TS = Time Series(
invisible,
Y( :Sales ),
Difference( 1, 0, 1 ),
ARIMA( 0, 1, 0 ),
SendToReport( Dispatch( {"Model Comparison"}, "", ScrollBox, {Background Color( 117 )} ) )
);
TS << Arima( 1, 0, 0, Actual( 1 ), Save Columns );Re: How can "Time Series" get the forecast data without showing the graph?The Scripting Index shows an example of creating the prediction formula from an Arima.

And if you add the universal "Invisible" to the Time Series() platform I think you will get what you want
TS = Time Series( invisible, ............
Re: How can "Time Series" get the forecast data without showing the graph?