gbm.rsb | R Documentation |
Loops through explanatory variables comparing their histogram in 'samples' to their histogram in 'grids' to see how well the explanatory variable range in samples represents the range being predicted to in grids. Assigns a representativeness score per variable per site in grids, and takes the average score per site if there's more than 1 expvar. Saves this to a CSV; it's plotted by gbm.map if called in gbm.auto. This shows you which areas have the most and least representative coverage by samples, therefore where you can have the most/least confidence in the predictions from gbm.predict.grids. Can be called directly, and choosing a subset of expvars allows one to see their individual / collective representativeness.
gbm.rsb(samples, grids, expvarnames, gridslat, gridslon)
samples |
Data frame with response and explanatory variables. |
grids |
Data frame of (more/different) explanatory variables and no response variable, to be predicted to by gbm.predict.grids. |
expvarnames |
Vector of column names of explanatory variables being tested. Can be length 1. Names must match in samples and grids. |
gridslat |
Column number for latitude in 'grids'. |
gridslon |
Column number for longitude in 'grids'. |
Gridded data table of representativeness values which is then mapped with gbm.map and also saved as a csv
Simon Dedman, simondedman@gmail.com
data(samples)
data(grids)
rsbdf_bin <- gbm.rsb(samples, grids, expvarnames = names(samples[c(4:8, 10)])
, gridslat = 2, gridslon = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.