Hello list, I' trying to estimate a log likelihood function from my data. I apply the mean to all my simulations, and I get something like this:
apply(likelihood, c(2, 3, 4), mean,na.rm=TRUE) , , 1 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.73162327 0.81197093 0.58216435 0.7295733 0.8930731 0.971775402 0.8882391 [2,] 0.73162327 0.81197093 0.00000000 0.7295733 0.8930731 0.971775402 0.8882391 If you note, there is a 0.00000000 value, and it seems that R is truncating it as a zero, because when I apply the log apply(likelihood, c(2, 3, 4), mean,na.rm=TRUE) I get a "-inf" at that position... How do I avoid R truncating this value? Thanks! Andrea [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.