Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module will crash if few values are given #4

Open
vladaman opened this issue Nov 9, 2020 · 1 comment
Open

Module will crash if few values are given #4

vladaman opened this issue Nov 9, 2020 · 1 comment

Comments

@vladaman
Copy link

vladaman commented Nov 9, 2020

Following example will exit with an error (crash). This error can't be even handled with try/catch:

const arima = require('arima');

let pVals = [0, 0, 0, 0, 12, 9.55, 12];

const [pred, errors] = arima(pVals, 2, {
    method: 0,
    optimizer: 6,
    p: 3,
    q: 0,
    d: 1,
    verbose: true
});
console.log(pred);
@zemlyansky
Copy link
Owner

I've just updated the package with the latest ctsa code. Now it has a new object-oriented API, but still supports the old functional one. After updating arima to 0.2.1 your example produces such output:

Calling ARIMA as a function will be deprecated in the future
Warning : The Matrix system does not have a unique solutionWarning : The Matrix system does not have a unique solutionWarning : The Matrix system does not have a unique solution
 SARIMAX summary: 


 Exit Status 
Return Code : 1 
Exit Message : Probable Success

  ARIMA Seasonal Order : ( 3, 1, 0) * (0, 0, 0) 

Coefficients        Value               Standard Error       

AR1              -0.176149           0.371344             
AR2              0.121743            0.359776             
AR3              0.024819            0.56106              

MEAN             0                    

SIGMA^2          24.0706              

ESTIMATION METHOD : CSS-MLE

OPTIMIZATION METHOD : L-BFGS

EQUATION FORM : x[t] + 0.176149*x[t - 1] - 0.121743*x[t - 2]- 0.024819*x[t - 3]= a[t] 

Log Likelihood : -18.0911 

AIC criterion : 44.1821 

[ 11.567994462089692, 11.881554977033822 ] [ 24.070645510870207, 40.40814531575646 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants