Double ARMALogLike(TVec Data, TVec Trend, TVec Phi, TVec Theta, TVec Residuals)
-2log likelihood.
| # | Name | Description |
|---|---|---|
| 1 | Data | Input date. |
| 2 | Trend | Optional trend line. Can be nil, if constant (average value) is assumed. |
| 3 | Phi | stores phi[0]..phi[p-1] coefficients. The order of AR(p) is defined by Phi vector length. |
| 4 | Theta | stores theta[0]..theta[q-1] coefficients. The order of AR(p) is defined by Phi vector length. |
| 5 | Residuals | stores the "errors" left after the fitting process. |
Returns: Double - -2log likelihood for ARIMA(p,q,d) process.
Examples
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
private void Example()
{
Vector phi = new Vector(0);
Vector theta = new Vector(0);
Vector ts = new Vector(0);
phi.SetIt(false, new double[] {0.33,-0.24});
theta.SetIt(false,new double[] {0.9});
// ARMA(2,1,2) process -> evaluate -2log likelihood
double l = StatTimeSerAnalysis.ARMALogLike(ts,phi,theta);
}
}