ppgm {ppgm}R Documentation

ppgm

Description

ppgm makes a paleophylogeographic species distribution model using the bioclimate envelope method for a specified time period. Currently, models are only available for North America.

Usage

ppgm(occurrences, fossils = FALSE, trees, fossils.edges = FALSE, 
model = "BM", permut = 1, only.biovars = TRUE, which.biovars = c(1:19), 
path = "", plot.TraitGram = FALSE, plot.AnimatedMaps = FALSE, 
plot.GeoRates = FALSE, bounds = list(), control = list(), 
use.paleoclimate = TRUE, paleoclimateUser = NULL, layerAge=c(0:20), 
verbose = TRUE)

Arguments

occurrences

a matrix with three columns of species name, longitude, and latitude, in that order, and rows that are entries for species occurrences. The bioclimate variables can be included for each occurrence in following columns. They must be in order 1 through 19.

fossils

a matrix with four columns of min age, max age, longitude, and latitude, in that order, and rows that are entries for fossil occurrences. The bioclimate variables can be included for each occurrence in following columns. They must be in order 1 through 19. All 19 variables must be included at this stage, variable selection is done with the argument: "which.biovars".

trees

phylogenies of species from first column of occurrences argument. Object of class multiphylo.

fossils.edges

a vector of edges that the fossils belong to. Must be in the same order of the fossils argument. If fossils.edges is false, the the function randomly assigns the location of the fossils depending on the age (see details for more information).

model

the model of evolution to use to estimate ancestor nodes. Argument is passed onto to function nodeEstimate.

permut

the number of times to randomly place fossils in phylogeny and estimate ancestor states.

only.biovars

logical. If FALSE, user must include biovariables in occurrence object.

which.biovars

a vector with the biovars to include in model (see www.worldclim.org for a list of biovars). If "ALL", then all 19 biovars are included in analysis.

path

path to the directory where the results should be saved.

plot.TraitGram

logical. Whether to plot a TraitGram

plot.AnimatedMaps

logical. Whether to plot AnimatedMaps. Requires ImageMagick to be installed on the system.

plot.GeoRates

logical. Whether to plot GeoRates

bounds

parameters for the evolutionary model selected. If none are supplied the default is used

control

settings used for optimisation of model likelihood. Passes to geiger::fitContinuous

use.paleoclimate

if left blank, default North America paleoclimate data is used. If FALSE, user submitted paleoclimate must be provided

paleoclimateUser

list of data frames with paleoclimates, must be dataframes with columns: GlobalID, Longitude, Latitude, bio1, bio2,...,bio19.

layerAge

vector with the ages of the paleoclimate dataframes, if using user submitted paleoclimate data

verbose

default true, returns all outputs. If FALSE then returns only climate envelopes and geographic data

Details

If the 19 bioclimate variables are not supplied with the occurrences or with the fossils, they will be extracted from the closest 50km point location in the modern or paleoclimate maps that are loaded in with this function. The paleoclimate maps are isotopically scaled between general circulation models (see Lawing and Polly 2011; Rodder et al. 2013) and modern climate (see Hijmans et al. 2005). The fossils paleoclimate data is extracted to the closest million year paleoclimate map. Paleoclimate maps are derived at one million year intervals for the past 20 Ma. The tree (phylogeny) should be dichotomous and the species names should match the names in the first column of the occurrences argument.

Value

cem Estimate of climate envelope for each species in present time. A data frame containing species and min mean and max of biovars specified with which.biovars.

geo_move data frame of RateGeoCenter and RateGeoSize

change_geo_center array of change in geographic center of suitable climate for each lineage

change_geo_size array of change in geographic size of suitable climate for each lineage

time_int matrix array of time intervals

treedata_min list of trees with minimum bioclimatic variables

treedata_max list of trees with maximum bioclimatic variables

model_min list of trees with minimum fitted model as specified in model

model_max list of trees with maximum fitted model as specified in model

node_est list of traits at each node for all trees, min and max for each species. As estimated by nodeEstimate and nodeEstimateEnvelopes

aicmin if model is estimated, table of aic values for minimum trait values for all trees

aicmax if model is estimated, table of aic values for maximum trait values for all trees

Author(s)

A. Michelle Lawing, Alexandra F. C. Howard, Maria A. Hurtado-Materon

Examples

data(sampletrees)
data(occurrences)
bounds <- list(sigsq = c(min = 0, max = 1000000))
test_ppgm <- ppgm(occurrences = occurrences,trees = sampletrees, 
model = "BM", which.biovars = c(1), bounds = bounds, 
control = list(niter = 20))

[Package ppgm version 1.0.3 Index]