Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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`"}*)
share|improve this question
    
@Szabolcs I was looking for that the other day. Instead, I accidentally removed both Global` and System` from my $ContextPath, and things went a little weird. :) –  rcollyer May 21 '12 at 13:54
    
Another related discussion –  Leonid Shifrin May 21 '12 at 14:05
    
So, trying out those solution it appears that my problem is something else entirely, since when I load the Time Series package it is the package LogLikelihoodfunction that I can't access, even when using the full context in referring to it. –  Mr Alpha May 21 '12 at 14:56
4  
To those who vote(d) to delete: I think it would make much more sense to keep this as another gateway to the same common problem. –  Leonid Shifrin May 21 '12 at 15:06
3  
@MrAlpha If you could add your new findings to your question I feel this makes for a completely new situation. The other questions have answers that mostly assume that using the full name should resolve the shadowing problem, which doesn't appear to be the case in your situation. Could you retry this first on a freshly started system, just to be sure? A complication is that Time Series isn't a standard package, so I'm not sure how many of us would be able to duplicate what you found. After updating please flag for moderator attention. –  Sjoerd C. de Vries May 21 '12 at 20:27
show 8 more comments

1 Answer

up vote 6 down vote accepted

Wolfram has renamed the LogLikelihood function in the Time Series package to LogLikelihoodFunction. But they have apparently forgotten to update the documentation.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.