2

I get the following error message when calculating bootstrap confidence intervals with the "boot" package:

Error in if (const(t, min(1e-08, mean(t, na.rm = TRUE)/1e+06))) { : 
  Missing Value, where TRUE/FALSE is necessary

This error occurs only if I want to calculate bootstrap confidence intervals for spearman correlation coefficients across countries of a specific variable and is thus not easily reproduced. For many variables the code runs nicely, but for this specific one I obtain the above error message. This particular variable has not caused any trouble anywhere else for me so far, which makes me doubt that it is about this variable. Can anybody give me a hint as to what the above error message might be hinting at?

StupidWolf
  • 45,075
  • 17
  • 40
  • 72
user2983123
  • 65
  • 1
  • 2
  • 6
  • 1
    There is an `NA` value in `t`. Use `debugonce` to find out where it comes from. – Roland Nov 12 '13 at 12:50
  • Without a minimally reproducible example, it is difficult to say. I just came across this exact error and what helped was to check the values of `t` as Roland mentions. If you save the results of the `boot.ci()` to a variable, say `results`, you can then access and view the results, like so `summary(results$t)` to give you an idea of what is going on. – Eric Leung Mar 14 '19 at 06:29

0 Answers0