arima_object obj = arima_init(p, d, q, N); // Initialize ARIMA object
// p - Number of Autoregressive coefficients
// d - Number of times the series needs to be differenced
// q - Number of Moving Average Coefficients
// N - Length of Time Series
Execution
arima_exec(obj, inp);
// obj - ARIMA object
// inp - Input Time series of length N
ARIMA Object Parameters
int N;// length of time series
int Nused;//length of time series after differencing, Nused = N - d
int method;// See Below
int optmethod; // See Below
int p;// size of phi
int d;// Number of times the series is to be differenced
int q;//size of theta
int M; // M = 0 if mean is 0.0 else M = 1
int ncoeff;// Total Number of Coefficients to be estimated
double *phi; // Auto-regression Coefficients
double *theta; // Moving Average Coefficents
double *vcov;// Variance-Covariance Matrix Of length lvcov
int lvcov; //length of VCOV
double *res; // Residuals of size Nused
double mean; // Mean
double var; // Variance
double loglik; // Log Likelihood Value
double aic; // AIC Criteria value
int retval; // return value . See Below
ARIMA Method (method)
0 - Exact Maximum Likelihood Method (Default)
1 - Conditional Method - Sum Of Squares
2 - Box-Jenkins Method
Optimization Method (optmethod)
optmethod accepts values between 0 and 7 where -
Method 0 - Nelder-Mead
Method 1 - Newton Line Search
Method 2 - Newton Trust Region - Hook Step
Method 3 - Newton Trust Region - Double Dog-Leg
Method 4 - Conjugate Gradient
Method 5 - BFGS
Method 6 - Limited Memory BFGS
Method 7 - BFGS Using More Thuente Method (Default)
void arima_setMethod(arima_object obj, int value); // Sets ARIMA method. value accepts 0,1 and 2
void arima_setOptMethod(arima_object obj, int value); // Sets Optimization method. Value accepts 0,1,2,3,4,5,6 and 7
void arima_vcov(arima_object obj, double *vcov); // Returns variance-covariance matrix vcov
void arima_summary(arima_object obj); // Prints ARIMA results and summary.
void arima_predict(arima_object obj, double *inp, int L, double *xpred, double *amse); // L-step Prediction for time series inp (length N). Returns length L output xpred and length L mean square error amse vectors
Deallocate Object Obj when the computation is finished