search for: sumlog

Displaying 2 results from an estimated 2 matches for "sumlog".

Did you mean: sublog
2009 Jan 29
1
Arima_Like() and NaN - a (possible) problem, a patch, and RFC
...e code (file src/arima.c of the stats package) and noticed that this second element is a sum of logarithmic terms, computed through the following snippet of code: gain = M[0]; for (j = 0; j < d; j++) gain += delta[j] * M[r + j]; if(gain < 1e4) { nu++; ssq += resid * resid / gain; sumlog += log(gain); } Here, sumlog is the second element of the resulting vector. However, the "if(gain < 1e4) {" check does not explicitly check against negative values of the gain variable. Indeed, whenever the gain variable assumes a negative value, the statement "sumlog += log(gain...
2006 Jun 02
2
Problem with mle
..., 288, 260, 153, 116, 57, 33, 40, 44, 36, 24, 35, 23, 36, 25, 35, 30) X <- c(1.74924, 3.49848, 5.24772, 6.99696, 8.74620, 17.49240, 26.23860, 34.98480, 43.73100, 52.47720, 61.22340, 69.96960, 71.71880, 73.46810, 75.21730, 76.96650, 78.71580, 80.46500 ) #Sum of log of values in vector SumLog <- function (x) { sum(log(x)) } #-ln(L) with Poisson Likelihood estimator NeglogPoisL <- function (obs, est) { sel <- est != 0 SumLogObs <- SumLog(obs[sel]) -sum( obs[sel] * log(est[sel]) - est[sel]- SumLogObs ) } #-ln(L) for Negative Exponential NENeglogPoisL <- function(a=0...