binomial_test: significance estimation of a niche model by using the cumulative binomial probability of success of predicting correctly an occurrence given the validation data and the proportional area predicted as present in the niche model.
binomial_test(binary_model, validation_data)
binary_model | A binary prediction map of the geographical distribution of a species. |
---|---|
validation_data | A numerical matrix or data.frame containing coordinates of the occurrences used to test the model to be evaluated; columns must be: longitude and latitude. |
A data.frame with 6 columns: (i) npixels_in_pred (numbre of pixeles in the prediction), (ii) npixels_pp (numbre of pixeles predicted as presences), (iii) prop_area_pp (proportional area predicted as presences), (iv) n_success (number of presences correctly predicted as presences), (v) n_fails (number of presences predicted as absences), and (vi) p_value (a value between 0-1 representing statistical significance of the niche model).
According to Anderson et al,(2003) The test is "employed to determine whether test points fall into regions of predicted presence more often than expected by chance, given the proportion of map pixels predicted present by the model". See Anderson,R.P. et al. (2003) Evaluating predictive models of species’ distributions: Criteria for selecting optimal models. Ecol. Model., 162, 211–232.
binary_model <- raster::raster(file.path(system.file("extdata", package = "ntbox"), "binary_ixodes.tif")) validation_data <- utils::read.csv(file.path(system.file("extdata", package = "ntbox"), "I_scapularis_eval.csv")) binomial_test(binary_model, validation_data)#> 1 validation data were omited because there are NA values (occurrences not in the prediction) #>#> $results_bin #> npixels_in_pred npixels_pp prop_area_pp n_success n_fails p_value #> count 18578 11944 0.642911 136 4 0 #> #> $coords_df #> Longitude Latitude binary_pred #> 1 -97.10792 32.57186 0 #> 2 -97.07791 36.15483 0 #> 3 -96.31667 30.66667 1 #> 4 -95.25333 30.94100 1 #> 5 -94.67556 34.19389 1 #> 6 -94.38599 45.59634 1 #> 7 -94.34676 45.47563 1 #> 8 -94.22242 30.72095 1 #> 9 -94.09186 36.01071 1 #> 10 -94.00000 38.00000 1 #> 11 -93.70000 36.00000 1 #> 12 -93.56582 47.22973 1 #> 13 -92.29000 34.74600 1 #> 14 -92.00000 34.23000 1 #> 15 -91.53654 36.49487 1 #> 16 -91.50139 29.79583 1 #> 17 -91.48300 36.31600 1 #> 18 -91.20544 47.39116 1 #> 19 -91.20543 47.39116 1 #> 20 -90.47960 41.53620 1 #> 21 -89.41080 41.98400 1 #> 22 -89.39853 40.63312 1 #> 23 -89.03321 43.10463 1 #> 24 -88.51358 42.87282 1 #> 25 -87.93389 42.47095 1 #> 26 -87.88040 41.76453 1 #> 27 -87.39590 41.29153 1 #> 28 -85.56024 35.03642 0 #> 29 -85.37159 34.65324 0 #> 30 -83.41725 38.78033 1 #> 31 -83.02000 40.00000 1 #> 32 -82.63944 30.18944 1 #> 33 -82.61955 28.89675 1 #> 34 -81.57061 41.32231 1 #> 35 -81.48000 26.13000 1 #> 36 -81.47000 26.26000 1 #> 37 -81.43187 41.13350 1 #> 38 -81.42448 41.12514 1 #> 39 -81.39145 41.13878 1 #> 40 -81.35782 41.06563 1 #> 41 -81.35507 41.06042 1 #> 42 -81.34081 41.06085 1 #> 43 -81.29000 28.46000 1 #> 44 -81.00000 34.00000 1 #> 45 -80.93000 26.75000 1 #> 46 -80.83146 40.51598 1 #> 47 -80.61344 40.72624 1 #> 48 -80.44700 40.51263 1 #> 49 -80.35285 42.01539 1 #> 50 -80.34711 32.68240 1 #> 51 -80.34516 32.67728 1 #> 52 -80.29843 36.87358 1 #> 53 -80.18413 40.65679 1 #> 54 -80.11821 40.61899 1 #> 55 -79.85994 40.57594 1 #> 56 -79.81152 39.69212 1 #> 57 -79.19664 34.48282 1 #> 58 -79.01917 41.66060 1 #> 59 -78.72191 42.88541 1 #> 60 -77.97540 40.75208 1 #> 61 -77.94971 40.78559 1 #> 62 -77.94971 40.78559 1 #> 63 -77.94971 40.78557 1 #> 64 -77.94971 40.78557 1 #> 65 -76.85326 38.90361 1 #> 66 -76.68792 39.88285 1 #> 67 -76.47144 42.48072 1 #> 68 -76.47141 42.48067 1 #> 69 -76.39490 42.45793 1 #> 70 -76.14619 42.82976 1 #> 71 -76.14079 43.03373 1 #> 72 -76.13000 39.47000 1 #> 73 -75.74627 44.32526 1 #> 74 -75.68000 44.59000 1 #> 75 -75.29789 43.10726 1 #> 76 -75.00333 40.18798 1 #> 77 -74.79463 41.30091 1 #> 78 -74.74900 41.00809 1 #> 79 -74.54954 40.23857 1 #> 80 -74.45348 40.57744 1 #> 81 -74.43775 40.51601 1 #> 82 -74.36199 40.53661 1 #> 83 -74.35603 40.84925 1 #> 84 -74.35505 40.84713 1 #> 85 -74.17087 40.61442 1 #> 86 -73.89002 42.60977 1 #> 87 -73.60905 41.29008 1 #> 88 -73.43519 40.84282 1 #> 89 -73.35101 44.07584 1 #> 90 -73.34003 44.69064 1 #> 91 -73.33896 44.69300 1 #> 92 -73.30504 44.11765 1 #> 93 -73.29456 42.48103 1 #> 94 -73.28062 44.62799 1 #> 95 -73.27300 44.07183 1 #> 96 -73.26817 44.50887 1 #> 97 -73.24705 44.04655 1 #> 98 -73.24561 44.11342 1 #> 99 -73.23452 44.39969 1 #> 100 -73.20489 43.97758 1 #> 101 -73.20469 43.97784 1 #> 102 -73.19123 44.11659 1 #> 103 -73.17815 44.01688 1 #> 104 -73.17696 44.05743 1 #> 105 -73.17100 44.01165 1 #> 106 -73.15706 44.02654 1 #> 107 -73.15138 44.01722 1 #> 108 -73.15109 44.01683 1 #> 109 -73.14976 44.01624 1 #> 110 -73.13602 42.02705 1 #> 111 -73.11745 44.47173 1 #> 112 -73.09896 43.61420 1 #> 113 -72.86205 41.42819 1 #> 114 -72.82621 42.62000 1 #> 115 -72.55350 43.63722 1 #> 116 -72.54327 43.62699 1 #> 117 -72.54120 43.63405 1 #> 118 -72.54101 43.62277 1 #> 119 -72.53278 43.37365 1 #> 120 -72.52344 43.63477 1 #> 121 -72.51995 43.63236 1 #> 122 -72.51904 43.63153 1 #> 123 -72.51068 43.61377 1 #> 124 -72.46131 44.34088 1 #> 125 -72.45771 44.33703 1 #> 126 -72.43245 43.50339 1 #> 127 -72.40666 43.64747 1 #> 128 -72.40606 43.64815 1 #> 129 -72.35752 43.62239 1 #> 130 -72.32669 42.16829 1 #> 131 -71.98691 41.37026 1 #> 132 -71.47149 42.40785 1 #> 133 -71.15703 42.39540 1 #> 134 -71.14721 42.39763 1 #> 135 -71.10526 42.19767 1 #> 136 -71.09388 42.30641 1 #> 137 -71.08034 42.05987 1 #> 138 -70.96955 42.59053 1 #> 139 -70.93212 42.57500 1 #> 140 -70.90180 42.60257 1 #> 141 -70.37090 41.69500 NA #>