sarima_object sarima_init(int p, int d, int q,int s,int P,int D,int Q, int N);
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
s - Seasonality/Period
P - Number of Seasonal Autoregressive coefficients
D - Number of times the seasonal series needs to be differenced (s*D)
Q - Number of Seasonal Moving Average Coefficients
Execution
sarima_exec(obj, inp);
obj - Seasonal ARIMA object
inp - Input Time series of length N
Seasonal ARIMA Object Parameters
int N;// length of time series
int Nused;//length of time series after differencing, Nused = N - d - s*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 s;// Seasonality/Period
int P;//Size of seasonal phi
int D;// The number of times the seasonal series is to be differenced
int Q;//size of Seasonal 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 *PHI; // Seasonal Auto-regression Coefficients
double *THETA;// Seasonal 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.
Seasonal 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)