The Time Series package for Mathematica comes with a function called LogLikelihood
. It is discussed and used extensively in the documentation (pdf). So does Mathematica 8. First I though my inability to use LogLikelihood
was that it was being shadowed by the LogLikelihood
function in Mathematica itself, but apparently not.
Loading the package with
Needs["TimeSeries`TimeSeries`"]
works for every other function, but the only LogLikelihood
function I have access to is Mathematica's built in one. Trying to refere to it with the full context, like so
TimeSeries`TimeSeries`LogLikelihood
doesn't work either. It is as if this one function simply isn't there. I've also tried re-downloading the package and reinstalling in case I got a corrupt version the first time around, but this hasn't helped.
EDIT: The way I am calling the function should be correct:
data = TimeSeries[ARModel[{0.5, -0.2}, 1], 20]
(*{0.775171, -0.0377616, -0.568652, 1.56771, 1.32269, -1.60302, \
-1.53275, 0.127154, 1.37393, 0.138493, -0.0484376, -0.506817, \
0.731963, 2.28373, 0.374458, 0.468365, 2.48781, 1.24375, 1.0746, \
-0.401619}*)
LogLikelihood[data, ARModel[{0.5}, 1]]
(*LogLikelihood[{0.775171, -0.0377616, -0.568652, 1.56771,
1.32269, -1.60302, -1.53275, 0.127154, 1.37393,
0.138493, -0.0484376, -0.506817, 0.731963, 2.28373, 0.374458,
0.468365, 2.48781, 1.24375, 1.0746, -0.401619}, ARModel[{0.5}, 1]]*)
EDIT2: Using full context in calling the function has the same result:
TimeSeries`TimeSeries`LogLikelihood[data, ARModel[{0.5}, 1]]
(*LogLikelihood[{0.775171, -0.0377616, -0.568652, 1.56771,
1.32269, -1.60302, -1.53275, 0.127154, 1.37393,
0.138493, -0.0484376, -0.506817, 0.731963, 2.28373, 0.374458,
0.468365, 2.48781, 1.24375, 1.0746, -0.401619}, ARModel[{0.5}, 1]]*)
EDIT3: This is the context path:
$ContextPath
(*{"TimeSeries`TimeSeries`", "PacletManager`", "WebServices`", \
"System`", "Global`"}*)
Global`
andSystem`
from my$ContextPath
, and things went a little weird. :) $\endgroup$LogLikelihood
function that I can't access, even when using the full context in referring to it. $\endgroup$