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 LogLikelihoodfunction 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. :) – rcollyer May 21 '12 at 13:54LogLikelihoodfunction that I can't access, even when using the full context in referring to it. – Mr Alpha May 21 '12 at 14:56LogLikelihoodand see what you get. (BTW I'm deleting my now irrelevant first comment.) – Szabolcs May 22 '12 at 14:28TimeSeries`TimeSeries`really on the context path or is it perhaps justTimeSeries`? Could you try an exact example from the documentation, for instance the one on page 80? – Sjoerd C. de Vries May 22 '12 at 14:29$UserBaseDirectory(per user install) or$BaseDirectory(install for all users). (Within the Applications subdir of these, of course.) You can check$InstallationDirectoryas well, but I hope it's not there ... it'd get wiped with a resintall ...FindFilewill help too, e.g.FindFile["Combinatorica`"]tells me where Combinatorica lives. – Szabolcs May 22 '12 at 15:05$BaseDirectory. After browsing through the code I also managed to figure out what the problem is. Apparently they've renamed the function, they just haven't bothered to update the documentation. – Mr Alpha May 22 '12 at 15:16