https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14682

Ok, understood. I'll try to make a patch with a fix using solution suggested.


05.05.2013 16:19, Matwey V. Kornilov пишет:
Hi,

 > sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-linux-gnu (64-bit)

I am experiencing following problem. I am trying to fit arima(2,0,4)
model, and optim complaint that armafn provides it with infinite value.
I found that it is because sumlog (res[2L]) (see stats/R/arima.R line
64) is NaN, because of gain in function ARIMA_Like (see
stats/src/arima.c line 674) becomes negative and log() of this is
calculated.

However, writing down expression for log-likelihood for ARIMA I don't
see any poles in this expression, so I would rather consider that
something wrong with evaluation here.

How to find, what is wrong here?


p.s. Does anybody know what the following code is intended to do?
(ARIMA_Like stats/src/arima.c)

             if(gain < 1e4) {
                 nu++;
                 ssq += resid * resid / gain;
                 sumlog += log(gain);
             }

I mean there is some hard coded magic value 1e4...


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to