Title: | Integrating Phylogenetics and Climatic Niche Modeling |
---|---|
Description: | Implements some methods in phyloclimatic modeling: estimation of ancestral climatic niches, age-range-correlation, niche equivalency test and background-similarity test. |
Authors: | Christoph Heibl, Clement Calenge (\code{import.ascii}) |
Maintainer: | Christoph Heibl <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.9.5 |
Built: | 2024-10-23 06:27:22 UTC |
Source: | CRAN |
This package implements some recently developed methods in phyloclimatic modeling.
Package: | phyloclim |
Type: | Package |
Version: | 0.9.5 |
Date: | 2018-05-25 |
License: | GPL (>= 2) |
phyloclim
is intended to provide methods for the quantification of niche occupancy and niche overlap and combine this data with phylogenetic trees.
Niche overlap can be quantified either from profiles of environmental suitability for a given environmental variable (PNO or predicted niche occupancy profiles, see pno
) or from two-dimensional suitability surfaces (environmental niche models (ENMs) or species distribution models (SDMs)) with niche.overlap
. Randomization tests for testing the significance of niche overlap in terms of niche identity and niche similarity are available in niche.equivalency.test
and bg.similarity.test
.
Phylogenetic data can be integrated into comparative methods such as age.range.correlation
and the estimation of ancestral environmental tolerances (anc.clim
), which is a non-parametric approach based on resampling of PNO profiles.
The functions in phyloclim
are in an early stage of development, so they should be used with care! Any feedback is welcome!
Maintainer: Christoph Heibl ([email protected])
Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution, and diversification of the 'bird-cage evening primroses' (Oenothera, sections Anogra and Kleinia). Am. Nat. 173: 225-240. Fitzpatrick, B.M & Turelli, M. 2006. The geography of mammalian speciation: mixed signals from phylogenies and range maps. Evolution 60: 601-615. Phillips, S.J, M. Dudik, & R.E. Schapire. 2006. Maximum entropy modeling of species geographic distributions. Ecological Modeling 190: 231-259.
Warren, D., R.E. Glor, & M. Turelli. 2008. Environmental niche equivalency versus conservatism: quantitative approaches to niche evolution. Evolution 62: 2868-2883.
This function can be used to test for phylogenetic signal in patterns of niche overlap (Warren et al., 2008) based on the age-range correlation (ARC) as implemented by Turelli & Fitzpatrick (2006).
age.range.correlation(phy, overlap, tri = "upper", n = 10000)
age.range.correlation(phy, overlap, tri = "upper", n = 10000)
phy |
an object of class |
overlap |
a matrix of class |
tri |
either |
n |
an integer giving the number of iterations for the Monte Carlo resampling procedure. |
In age-range correlation (ARC; sensu Fitzpatrick & Turelli 2006), phylogentic relationships are taken into account when computing average range (or niche) overlap between two clades at node i by
where the double sum is over all species in the two clades, o(jk) denotes the overlap between species j and k, and n(jk) is the number of nodes separating the two species on the phylogeny. Plotting against node ages depicts the ARC for a given clade. Slopes and intercept derived from a linear model can be used to characterize speciation mode (allopatric versus sympatric) or niche evolution (conservatism versus flexibility) in the clade (see Fitzpatrick & Turelli [2006] and Warren et al. [2008], respectively).
The significance of the ARC is assessed via Monte Carlo simulation by random permutation of the overlap matrix to estimate the distribution of slope and intercept unter the null hypothesis of no phylogenetic signal.
A list of four elements:
age.range.correlation |
A matrix with age and average overlap for each node. |
linear.regression |
A linear model of mean niche (or range)overlap versus node age. |
sig |
Significance of intercept and slope derived by randomization. |
MonteCarlo.replicates |
A matrix containing intercepts and slopes of randomized datasets. |
Christoph Heibl
Fitzpatrick, B.M & Turelli, M. 2006. The geography of mammalian speciation: mixed signals from phylogenies and range maps. Evolution 60: 601-615.
Warren, D., R.E. Glor, & M. Turelli. 2008. Environmental niche equivalency versus conservatism: quantitative approaches to niche evolution. Evolution 62: 2868-2883.
# load PNOs for Oxalis sect. Palmatifoliae ... data(PNO) # ... and calculate niche overlap between species no <- niche.overlap(PNO$AnnualMeanTemperature) # load phylogeny and PNOs of Oxalis sect. Palmatifoliae data(tree) # age-range correlation x <- age.range.correlation(phy = tree, overlap = no, n = 100) # plot average niche overlap versus node age plot(x$age.range.correlation) # add a regression line abline(x$linear.regression$coefficients) # add regression lines from Monte Carlo randomization apply(x$MonteCarlo.replicates, 1, abline, lwd = 0.2, col = "grey50")
# load PNOs for Oxalis sect. Palmatifoliae ... data(PNO) # ... and calculate niche overlap between species no <- niche.overlap(PNO$AnnualMeanTemperature) # load phylogeny and PNOs of Oxalis sect. Palmatifoliae data(tree) # age-range correlation x <- age.range.correlation(phy = tree, overlap = no, n = 100) # plot average niche overlap versus node age plot(x$age.range.correlation) # add a regression line abline(x$linear.regression$coefficients) # add regression lines from Monte Carlo randomization apply(x$MonteCarlo.replicates, 1, abline, lwd = 0.2, col = "grey50")
This function implements a nonparametric approach to estimate ancestral climatic tolerances proposed by Evans et al. (2009), using ace
from the ape
package.
anc.clim(target, posterior = NULL, pno, n = 100, method = "GLS")
anc.clim(target, posterior = NULL, pno, n = 100, method = "GLS")
target |
An object of class |
posterior |
An object of class |
pno |
A data frame containing predicted niche occupancy (PNO) profiles, produced e.g. with |
n |
An integer: The PNO profile given by |
method |
A character string specifying the method used for estimation. Two choices are possible: |
A list containing three elements:
tree |
An object of class |
means |
A vector containing the means of estimated ancestral climatic tolerances. The elements of |
central.density |
A matrix, which for each of the terminal nodes in |
Christoph Heibl
Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution, and diversification of the 'bird-cage evening primroses' (Oenothera, sections Anogra and Kleinia). Am. Nat. 173: 225-240.
# load phylogeny and PNOs of Oxalis sect. Palmatifoliae data(tree) data(PNO) # choose summer precipitation for analysis clim <- PNO$PrecipitationWarmestQuarter # estimate ancestral tolerances ac <- anc.clim(target = tree, pno = clim, n = 100) # visualize results plotAncClim(ac, ylab = "Precipitation of warmest quarter (mm)")
# load phylogeny and PNOs of Oxalis sect. Palmatifoliae data(tree) data(PNO) # choose summer precipitation for analysis clim <- PNO$PrecipitationWarmestQuarter # estimate ancestral tolerances ac <- anc.clim(target = tree, pno = clim, n = 100) # visualize results plotAncClim(ac, ylab = "Precipitation of warmest quarter (mm)")
Objects equ
and sim
contain the results of the niche.equivalency.test
and the bg.similarity.test
(Warren et al. 2008) for Oxalis enneaphylla and O. laciniata from section Palmatifoliae.
data(equ) data(sim)
data(equ) data(sim)
A list containing five elements:
Name of the test.
Names of the two species compared.
Test statistics D and I of niche overlap based on Schoeners D and modified Hellinger distances.
p-values for the test statistics (if method = "niche equivalency test"
).
Formulation of the null hypothesis.
Null distributions of D and I derived from randomization (if method = "niche equivalency test"
).
Confidence intervals based on null distributions (if method = "background similarity test"
).
Confidence intervals based on null distributions (if method = "background similarity test"
).
Null distributions of D and I derived from randomization (if method = "background similarity test"
).
Null distributions of D and I derived from randomization (if method = "background similarity test"
).
C. Heibl, unpublished data.
Warren, D., R.E. Glor, & M. Turelli. 2008. Environmental niche equivalency versus conservatism: quantitative approaches to niche evolution. Evolution. 62: 2868-2883.
# plot results of niche equivalency test data(equ) plot(equ) # plot results of background similarity test data(sim) plot(sim)
# plot results of niche equivalency test data(equ) plot(equ) # plot results of background similarity test data(sim) plot(sim)
Hypothesis testing as proposed by Warren et al. (2008) based on the generation of pseudoreplicate datasets. The niche equivalency (or identity) test asks whether the ecological niche models (ENMs) of two species are more different than expected if they were drawn from the same underlying distribution. The background similarity test asks whether ENMs drawn from populations with partially or entirely non-overlapping distributions are any more different from one another than expected by random chance.
niche.equivalency.test(p, env, n = 99, app, dir) bg.similarity.test(p, env, n = 99, conf.level = .95, app, dir) ## S3 method for class 'ntest' print(x, ...) ## S3 method for class 'ntest' plot(x, ...)
niche.equivalency.test(p, env, n = 99, app, dir) bg.similarity.test(p, env, n = 99, conf.level = .95, app, dir) ## S3 method for class 'ntest' print(x, ...) ## S3 method for class 'ntest' plot(x, ...)
p |
a |
env |
an object of class |
n |
an integer giving the number of permutations of the original data (default: |
conf.level |
a real number between 0 and 1 setting the confidence level of the confidence intervals to be calculated. |
app |
a character string giving the path to the MAXENT application. |
dir |
a character string giving the name of a directory where the input and output data for MAXENT will be saved. Already existing directories will be overwritten without a warning. If |
x |
an object of class |
... |
further arguments passed to or from other methods. |
An installation of MAXENT (Phillips et al., 2006; http://www.cs.princeton.edu/~schapire/maxent/) is required in order to run niche.equivalency.test
and bg.similarity.test
. Both functions use the logistic output of MAXENT estimated using auto features.
By default, the environmental covariates given with env
are assumend to be continuous. In order to use categorical environmental covariates, you have to prepend "cat_"
to the layer name, e.g. "cat_landuse"
.
niche.equivalency.test
gives a list with six elements:
method |
name of the test. |
species |
names of the two species compared. |
null |
formulation of the null hypothesis. |
statistic |
statistics of niche overlap D based on Schoeners D and modified Hellinger distances. |
p.value |
p-values associated with the statistics. |
null.distribution |
null distributions of D and I derived from randomization. |
bg.similarity.test
gives a list with eight elements:
method |
name of the test. |
species |
names of the two species compared. |
null |
formulation of the null hypothesis. |
statistic |
statistics of niche overlap D based on Schoeners D and modified Hellinger distances. |
ci.x.randomY |
confidence interval for D and I based on the comparison of the first species against a randomized background derived from the second species. |
ci.y.randomX |
confidence interval for D and I based on the comparison of the second species against a randomized background derived from the first species. |
nd.x.randomY |
null distributions of D and I calculated from the comparison of the first species against a randomized background derived from the second species. |
nd.y.randomX |
null distributions of D and I calculated from the comparison of the second species against a randomized background derived from the first species. |
These functions have been completely rewritten and have been tested with MAXENT 3.3.3k
Christoph Heibl
Phillips, S.J, M. Dudik, & R.E. Schapire. 2006. Maximum entropy modeling of species geographic distributions. Ecological Modeling 190: 231-259.
Warren, D., R.E. Glor, & M. Turelli. 2008. Environmental niche equivalency versus conservatism: quantitative approaches to niche evolution. Evolution. 62: 2868-2883.
# path to MAXENT # -------------- maxent.exe <- paste(system.file(package="dismo"), "/java/maxent.jar", sep = "") # a data frame of coordinates where two species # have been detected ('presence points') and # a raster stack of environmental covariables # -------------------------------------- species <- c("enneaphylla", "laciniata") data(sites) samples <- sites[grep(paste(species, collapse = "|"), sites$spec), ] data.path <- system.file("extdata", package = "phyloclim") preds <- list.files(path = data.path, pattern = "[.]asc") preds <- paste(data.path, preds, sep = "/") preds <- stack(lapply(X = preds, FUN = raster)) # testing against 9 permutations of the data # ------------------------------------------- reps <- 9 # run hypothesis tests # -------------------- if (file.exists(maxent.exe)){ net <- niche.equivalency.test(samples, preds, reps, maxent.exe) net; plot(net) bst <- bg.similarity.test(samples, preds, reps, app = maxent.exe) bst; plot(bst) } else { message("get a copy of MAXENT (see Details)") }
# path to MAXENT # -------------- maxent.exe <- paste(system.file(package="dismo"), "/java/maxent.jar", sep = "") # a data frame of coordinates where two species # have been detected ('presence points') and # a raster stack of environmental covariables # -------------------------------------- species <- c("enneaphylla", "laciniata") data(sites) samples <- sites[grep(paste(species, collapse = "|"), sites$spec), ] data.path <- system.file("extdata", package = "phyloclim") preds <- list.files(path = data.path, pattern = "[.]asc") preds <- paste(data.path, preds, sep = "/") preds <- stack(lapply(X = preds, FUN = raster)) # testing against 9 permutations of the data # ------------------------------------------- reps <- 9 # run hypothesis tests # -------------------- if (file.exists(maxent.exe)){ net <- niche.equivalency.test(samples, preds, reps, maxent.exe) net; plot(net) bst <- bg.similarity.test(samples, preds, reps, app = maxent.exe) bst; plot(bst) } else { message("get a copy of MAXENT (see Details)") }
This function quantifies the degree of niche overlap using the statistics D and I (as proposed by Warren et al., 2008) based on Schoeners D (Schoener, 1968) and Hellinger Distances (van der Vaart, 1998). Niche overlap can be calculated either from the probability surfaces of entire ecological niche models (Warren et al., 2008) or from single dimensions of the climatic niches (Evans et al., 2009).
niche.overlap(x)
niche.overlap(x)
x |
Might take one of the follwing forms: (1) a data frame containing predicted niche occupancy (PNO) profiles, e.g., as derived by |
A matrix of class "niolap"
. The upper triangle contains pairwise comparisons of niche overlap in terms of D, whereas the lower triangle contains values of I.
Christoph Heibl
Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution, and diversification of the 'bird-cage evening primroses' (Oenothera, sections Anogra and Kleinia). Am. Nat. 173: 225-240.
Schoener, T.W. 1968. Anolis lizards in Bimini: resource partitioning in a complex fauna. Ecology 49: 704-726.
Van der Vaart, A.W. 1998. Asymptotic statistics. Cambridge University Press, U.K.
Warren, D. L., R. E. Glor, & M. Turelli. 2008. Environmental niche equivalency versus conservatism: quantitative approaches to niche evolution. Evolution 62: 2868-2883.
pno
,
niche.equivalency.test
,
bg.similarity.test
,
age.range.correlation
# load PNOs for Oxalis sect. Palmatifoliae data(PNO) # niche overlap on a annual precipitation gradient: no <- niche.overlap(PNO$AnnualPrecipitation) # upper triangle: based on Schoeners D # lower triangle: based on Hellinger distances print(no)
# load PNOs for Oxalis sect. Palmatifoliae data(PNO) # niche overlap on a annual precipitation gradient: no <- niche.overlap(PNO$AnnualPrecipitation) # upper triangle: based on Schoeners D # lower triangle: based on Hellinger distances print(no)
This is a data set of Oxalis sect. Palmatifoliae derived from a larger scale study by Heibl & Renner (2012). The sites
data frame gives the coordinates (WGS1984) of the sites where Oxalis sect. Palmatifoliae has been collected. These were taken as presence points in distribution modeling and the list of predicted niche occupancy profiles (PNO
). Finally, tree
holds a phylogenetic hypothesis for the section extracted from a relaxed molecular clock model of the phylogeny of Oxalidales based approx. 7500 bp of chloroplast and nuclear markers.
For 19 bioclimatic variables summarizing temperature and precipiation and five species of Oxalis, the suitability or probability of occurence is given along the environmental gradients.
data(PNO) data(sites) data(tree)
data(PNO) data(sites) data(tree)
sites
a data frame representing 290 collections of Oxalis sect. Palmatifoliae.
PNO
a list consisting of 19 matrixes. Each matrix corresponds to an environmental variable and contains the predicted niche occupancy profile (PNO) for each species of Oxalis sect. Palmatifoliae, whereby column 1 of each matrix gives the values of the environmental variable and columns 2-6 give probabilites of occurance of each species along the environmental gradient in column 1.
tree
an object of class "phylo"
(see Value section of read.tree
).
Heibl, C. & S.S. Renner. Arid-adapted Distribution models and a dated phylogeny for Chilean Oxalis species reveal occupation of new habitats by different lineages, not rapid adaptive radiation. 2012. Syst. Biol. 61(5): 823-834.
# 290 collections of Palmatifoliae # -------------------------------- data(sites) plot(sites$long, sites$lat, xlab = "Longitude", ylab = "Latitude") ## PNO profiles along 19 bioclimatic variables ## ------------------------------------------- data(PNO); names(PNO) temp <- names(PNO)[1] plotPNO(PNO[[temp]], xlab = temp) ## phylogenetic hypothesis for Palmatifoliae ## ----------------------------------------- data(tree) plot(tree)
# 290 collections of Palmatifoliae # -------------------------------- data(sites) plot(sites$long, sites$lat, xlab = "Longitude", ylab = "Latitude") ## PNO profiles along 19 bioclimatic variables ## ------------------------------------------- data(PNO); names(PNO) temp <- names(PNO)[1] plotPNO(PNO[[temp]], xlab = temp) ## phylogenetic hypothesis for Palmatifoliae ## ----------------------------------------- data(tree) plot(tree)
Plot the history of climatic tolerance for a clade sensu Evans et al. (2009).
plotAncClim(x, layer, clades = NULL, col, density = TRUE, tipmode = 1, nchar = 3, cex, tipspace, cladespace = 1, lwd, ylab = "")
plotAncClim(x, layer, clades = NULL, col, density = TRUE, tipmode = 1, nchar = 3, cex, tipspace, cladespace = 1, lwd, ylab = "")
x |
A list with elements |
layer |
Do not use. |
clades |
A list containing vectors of tip labels which define the clades to highlight. |
col |
A vector containing colors for different clades (see Examples). |
density |
Logical, if |
tipmode |
Integer: |
nchar |
An integer giving the number of characters to which the tiplabels are truncated. |
cex |
Numeric character expansion factor for tiplabels;
multiplied by |
tipspace |
The fraction of the x-axis that is reserved for tiplabel
plotting. If no value is given (default), |
cladespace |
A positive reel number; tentative: a factor controlling the space between tiplabels of different clades. |
lwd |
The line width, a positive number, defaulting to 1. |
ylab |
A character string, giving a label for the y-axis, i.e., for the bioclimatic dimension of the plot. |
The main argument x
is a list consisting of at least the first
two of the following elements: (1) tree
is an ultrametric
phylogenetic tree stored as object of class phylo
; (2) data
is
an object of class matrix
; its columns correspond to bioclimatic
variables and its rows corresond to node numbers such as defined by class
phylo
objects; (3) central.density
must only be included if
density = TRUE
– it is a list, which for every bioclimatic variable,
contains a matrix that contains the some minimum and maximum quantile of the
respective bioclimatic variable for every tip in the tree.
Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution, and diversification of the 'bird-cage evening primroses' (Oenothera, sections Anogra and Kleinia). Am. Nat. 173: 225-240.
pno
, pno.weighted.mean
,
anc.clim
# load phylogeny and PNOs of Oxalis sect. Palmatifoliae data(tree) data(PNO) # choose summer precipitation for analysis clim <- PNO$PrecipitationWarmestQuarter # estimate ancestral tolerances ac <- anc.clim(target = tree, pno = clim, n = 100) # visualize results with default branch coloration plotAncClim(ac) # alternative clade colors are given according to the order # in which tip labels appear from left to right plotAncClim(ac, col = c("red", "purple", "blue")) # the 'tipmode' argument plotAncClim(ac, tipmode = 0) plotAncClim(ac, tipmode = 1) plotAncClim(ac, tipmode = 2, nchar = 5) plotAncClim(ac, tipmode = 3, nchar = 4)
# load phylogeny and PNOs of Oxalis sect. Palmatifoliae data(tree) data(PNO) # choose summer precipitation for analysis clim <- PNO$PrecipitationWarmestQuarter # estimate ancestral tolerances ac <- anc.clim(target = tree, pno = clim, n = 100) # visualize results with default branch coloration plotAncClim(ac) # alternative clade colors are given according to the order # in which tip labels appear from left to right plotAncClim(ac, col = c("red", "purple", "blue")) # the 'tipmode' argument plotAncClim(ac, tipmode = 0) plotAncClim(ac, tipmode = 1) plotAncClim(ac, tipmode = 2, nchar = 5) plotAncClim(ac, tipmode = 3, nchar = 4)
This function can be used to plot predicted niche occupancy profiles (PNOs). PNOs can be obtained in a geographical information system by summing the cumulative probabilies of each climatical value for a species distribution model (SDM).
plotPNO(x, subset = NULL, thinning = NULL, xlab = NULL, tail_threshold = 0, wm = FALSE, legend.pos = "topleft")
plotPNO(x, subset = NULL, thinning = NULL, xlab = NULL, tail_threshold = 0, wm = FALSE, legend.pos = "topleft")
x |
A data frame or matrix with columns corresponding to species and rows corresponding to values along an environmental gradient. The first columns contains the environmental variable, the remaining colums probabilities of suitability. |
subset |
A vector of mode |
thinning |
An integer that can be used to thin fuzzy PNOs prior to plotting; defaults to |
xlab |
A character string given the label for the x-axis. |
tail_threshold |
A numeric that can be used cut long tails of PNOs; defaults to |
wm |
A logical indicating if weighted mean should added for each species. |
legend.pos |
Controls the position of the legend. Might eihter be a list object containing x and y coordinates (such as e.g. returned by |
Christoph Heibl
Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution, and diversification of the 'bird-cage evening primroses' (Oenothera, sections Anogra and Kleinia). Am. Nat. 173: 225-240.
# load PNOs for Oxalis sect. Palmatifoliae data(PNO) # plot predicted niche occupany for annual mean temperature plotPNO(x = PNO$AnnualMeanTemperature, xlab = "Annual Mean Temperature (degree C)") # same plot, but with weighted means added plotPNO(x = PNO$AnnualMeanTemperature, xlab = "Annual Mean Temperature (degree C)", wm = TRUE)
# load PNOs for Oxalis sect. Palmatifoliae data(PNO) # plot predicted niche occupany for annual mean temperature plotPNO(x = PNO$AnnualMeanTemperature, xlab = "Annual Mean Temperature (degree C)") # same plot, but with weighted means added plotPNO(x = PNO$AnnualMeanTemperature, xlab = "Annual Mean Temperature (degree C)", wm = TRUE)
Following the approach of Evans et al. (2009), pno
integrates species probability (suitability) distributions (e.g. derived with MAXENT) with respect to single climatic (or other environmental) variables in order to get predicted niche occupancy (PNO) profiles for each species and environmenatal variable.
pno(path_bioclim, path_model, subset = NULL, bin_width = 1, bin_number = NULL)
pno(path_bioclim, path_model, subset = NULL, bin_width = 1, bin_number = NULL)
path_bioclim |
The path leading to an ASCII raster map with environmental data (bioclimatic layer) and ArcGIS-compatible header. |
path_model |
The path leading to the directory, where MAXENT probability surfaces are stored as ASCII raster maps with ArcGIS-compatible header. |
subset |
A vector of mode 'character' giving taxon names if only a subset of the species ENMs in |
bin_width |
A numeric, giving the bin interval. |
bin_number |
An integer, giving the number of bins used. |
The path arguments path_bioclim
and path_model
point to the directories where the environmental data and the MAXENT probability distributions must be stored as ASCII maps with an ArcGIS-compatible header (as obtained with MAXENT output filetype: asc). An example header:
ncols | 958 | |
nrows | 376 | |
xllcorner | -73.440304 | |
yllcorner | -55.27622 | |
cellsize | 0.0166 | |
NODATA_value | -9999 | |
A data frame of cumulative probalities of suitability for each value on an environmental gradient (rows) for the a set of studied taxa (rows). The first column gives the mean of each category.
Christoph Heibl
Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution, and diversification of the 'bird-cage evening primroses' (Oenothera, sections Anogra and Kleinia). Am. Nat. 173: 225-240.
pno.weighted.mean
,
niche.overlap
,
anc.clim
This function calculates the mean of an environmental variable weighted by the cumulative probability of each value of the environmental gradient extracted from a species distibution model (e.g. MAXENT)
pno.weighted.mean(x, subset = NULL, normalize = TRUE)
pno.weighted.mean(x, subset = NULL, normalize = TRUE)
x |
A data frame or matrix with columns corresponding to species and rows corresponding to values along an environmental gradient. The first columns contains the environmental variable, the remaining colums probabilities of suitability. |
subset |
A vector of mode |
normalize |
A logical, indicating whether to normalize PNOs prior to calculation of weighted means. |
A vector of weighted means corresponding to the columns in x
.
Christoph Heibl
Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, niche evolution, and diversification of the 'bird-cage evening primroses' (Oenothera, sections Anogra and Kleinia) Am. Nat. 173: 225-240.