This function fits the climate response of the selected taxa to the selected climate variables.

crest.calibrate(
x,
bin_width = x$parameters$bin_width,
shape = x$parameters$shape,
npoints = x$parameters$npoints,
geoWeighting = x$parameters$geoWeighting,
climateSpaceWeighting = x$parameters$climateSpaceWeighting,
verbose = TRUE
)

## Arguments

x

A crestObj produced by the crest.get_modern_data function.

bin_width

The width of the bins used to correct for unbalanced climate state. Use values that split the studied climate gradient in 15-25 classes (e.g. 2°C for temperature variables). Default is 1.

shape

The imposed shape of the species pdfs. We recommend using 'normal' for temperature variables and 'lognormal' for the variables that can only take positive values, such as precipitation or aridity. Default is 'normal' for all.

npoints

The number of points to be used to fit the pdfs. Default 200.

geoWeighting

A boolean to indicate if the species should be weighting by the square root of their extension when estimating a genus/family level taxon-climate relationships.

climateSpaceWeighting

A boolean to indicate if the species pdfs should be corrected for the modern distribution of the climate space (default TRUE).

verbose

A boolean to print non-essential comments on the terminal (default TRUE).

## Value

A crestObj object containing the spatial distributions and the climate space.

## Examples

if (FALSE) {
data(crest_ex_pse)
data(crest_ex_selection)
data(crest_ex)
x <- crest.get_modern_data( df = crest_ex,
pse = crest_ex_pse, taxaType = 0,
climate = c("bio1", "bio12"),
selectedTaxa = crest_ex_selection, dbname = "crest_example",
verbose = FALSE
)
x <- crest.calibrate(x,
geoWeighting = TRUE, climateSpaceWeighting = TRUE,
bin_width = c(2, 50), shape = c("normal", "lognormal"),
verbose = FALSE
)
}