Open mebrooks opened 1 year ago
I think the problem is how zeros are being reported on the log-scale.
Yes I think that's it. I only put the Fs that are above 1 into log scale in the c++ code. Then the R code sets them to -Inf before taking the exponent (since exp(-Inf) in R = 0).
I the above code you take the exponent of the zero values which then gives an incorrect F = 1. Probably the correct thing to do in the c++ code would be to assign the zero values to -Inf or NA.
Before I started using the function
getFbar
, I was using this other way. Now I noticed that they don't always agree and I'm wondering why. In some years they're the same within machine precision, but in other years (e.g. 2013), they're exactly 1.0 different. I can look into it this week, but wanted to document it before I forget.