-2log likelihood.
Example 1
Uses MtxExpr, StatTimeSerAnalysis, Math387;
procedure Example;
var phi,theta, ts: Vector
l: TSample;
begin
ts.LoadFromFile('ts_data.vec');
phi.SetIt(false,[0.33,-0.24]);
theta.SetIt(false,[0.9]);
// ARIMA(2,1,2) process -> evaluate -2log likelihood
l := ARIMALogLike(ts,phi,theta,2);
end;
#include "MtxVecCpp.h"
#include "Math387.hpp"
#include "StatTimeSerAnalysis.hpp"
void __fastcall Example();
{
Vector phi,theta,ts;
phi->SetIt(false,OPENARRAY(TSample,(0.33,-0.24)));
theta->SetIt(false,OPENARRAY(TSample,(0.9)));
// ARIMA(2,1,2) process -> evaluate -2log likelihood
double l = ARIMALogLike(ts,phi,theta,2);
}
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});
// ARIMA(2,1,2) process -> evaluate -2log likelihood
double l = StatTimeSerAnalysis.ARIMALogLike(ts,phi,theta,2);
}
}