Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/compare_covariates.R
Summarises the extent of univariate (Type I) and combinatorial (Type II) extrapolation associated with different combinations of input covariates.
1 2 3 4 5 6 7 8 9 |
extrapolation.type |
Character string. Type of extrapolation to be assessed. Can be one of |
extrapolation.object |
List object as returned by compute_extrapolation. |
n.covariates |
Maximum number of covariates. The function will compare all combinations of 1 to |
create.plots |
Logical, defaults to |
display.percent |
Logical. If |
verbose |
Logical. Show or hide possible warnings and messages. |
... |
Additional parameters passed to compute_extrapolation. These are optional when |
The extent and magnitude of extrapolation naturally vary with the type and number of covariates considered. It may be useful, therefore, to test different combinations of covariates to inform their selection a priori, i.e. before model fitting, thereby supporting model parsimony.
Prints a summary table in the R console. Also generates summary boxplots if create.plots
is set to TRUE
.
Phil J. Bouchet
Bouchet PJ, Miller DL, Roberts JJ, Mannocci L, Harris CM and Thomas L (2019). From here and now to there and then: Practical recommendations for extrapolating cetacean density surface models to novel conditions. CREEM Technical Report 2019-01, 59 p. https://research-repository.st-andrews.ac.uk/handle/10023/18509
Mesgaran MB, Cousens RD, Webber BL (2014). Here be dragons: a tool for quantifying novelty due to covariate range and correlation change when projecting species distribution models. Diversity & Distributions, 20: 1147-1159. DOI: 10.1111/ddi.12209
compute_extrapolation
, summarise_extrapolation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | library(dsmextra)
# Load the Mid-Atlantic sperm whale data (see ?spermwhales)
data(spermwhales)
# Extract the data
segs <- spermwhales$segs
predgrid <- spermwhales$predgrid
# Define relevant coordinate system
my_crs <- sp::CRS("+proj=aea +lat_1=38 +lat_2=30 +lat_0=34 +lon_0=-73 +x_0=0
+y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0")
# Define covariates
my_cov <- c("Depth", "SST", "NPP", "DistToCAS", "EKE")
# Compare the extent of univariate and combinatorial
# extrapolation for all combinations of 1 to 5 covariates
compare_covariates(extrapolation.type = "both",
covariate.names = my_cov,
n.covariates = NULL,
samples = segs,
prediction.grid = predgrid,
coordinate.system = my_crs,
create.plots = TRUE,
display.percent = TRUE)
# Can also run this function directly from the
# object returned by compute_extrapolation
spermw.extrapolation <- compute_extrapolation(samples = segs,
covariate.names = my_cov,
prediction.grid = predgrid,
coordinate.system = my_crs)
compare_covariates(extrapolation.type = "both",
extrapolation.object = spermw.extrapolation)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.