In R, I have the following matrix (each row represents a 95% confidence boot interval generated from the same sample data):
low high [1,] 22.2 25.5 [2,] 23.1 25.9 [3,] 23.4 26.1 ...
I know the true value of a data population, it is 23.3. So the first two include the true average, but the third does not.
In R, I want to run a for loop from i to nrow(matrix) , each i , checking if the value of the true data set is actually in this particular interval, and then returns the column height vector nrow(matrix) of TRUE if the interval contains a true average value, and FALSE otherwise.
How can i do this?
source share