plotall {climwin} | R Documentation |
Visualise climate window data
Description
Creates a panel of plots to help visualise climate window data.
Usage
plotall(
dataset,
datasetrand = NULL,
bestmodel = NULL,
bestmodeldata = NULL,
cw1 = 0.95,
cw2 = 0.5,
cw3 = 0.25,
title = NULL,
arrow = FALSE
)
Arguments
dataset |
A dataframe containing information on all fitted climate
windows. Output from |
datasetrand |
A dataframe containing information on all fitted climate
windows using randomised data. Output from |
bestmodel |
A model object. The strongest climate window model. Returned
from |
bestmodeldata |
A dataframe containing the biological and climate data
used to fit the strongest climate window model. Output from
|
cw1 , cw2 , cw3 |
Cumulative weight levels used to visualise model weight
distribution. See |
title |
Title of the plot panel. |
arrow |
TRUE or FALSE. Add arrows to plots to pinpoint best window. |
Value
Will return a panel of 6-8 plots:
DeltaAICc: A colour plot of model deltaAICc values (larger negative values indicate stronger models). DeltaAICc is the difference between AICc of each climate window model and the baseline model containing no climate data.
Model weight: A plot showing the distribution of cumulative model weights. Gradient levels determined by parameters cw1, cw2 and cw3. Darker areas have a higher chance of containing the best climate window. Also returns the percentage of models within the 95
Model betas: A colour plot of model beta estimates. Where applicable, 2nd order coefficients (quadratic) and 3rd order coefficients (cubic) will be plotted separately.
Histogram(s): If datasetrand is provided, plotall will return a histogram showing the deltaAICc of randomised data. This can help determine the likelihood of obtaining a deltaAICc value for a fitted climate window model at random. plotall will also use
pvalue
to return values of Pc and PdeltaAICc.Boxplots: Two boxplots showing the start and end time for a subset of best climate windows. Best climate windows make up the cumulative model weight equivalent to the largest value of cw1, cw2 and cw3. Values above boxplots represent the median values.
Best Model: If bestmodel and bestmodeldata are provided, plotall will create a scatterplot to show the fit of the best model through the data.
Author(s)
Liam D. Bailey and Martijn van de Pol
Examples
# Visualise a fixed climate window generated for dataframes Mass and MassClimate
data(MassOutput)
data(Mass)
data(MassClimate)
single <- singlewin(xvar = list(Temp = MassClimate$Temp),
cdate = MassClimate$Date, bdate = Mass$Date,
baseline = lm(Mass ~ 1, data = Mass),
range = c(72, 15),
stat = "mean", func = "lin",
type = "absolute", refday = c(20, 5),
cmissing = FALSE, cinterval = "day")
plotall(dataset = MassOutput, bestmodel = single$BestModel,
bestmodeldata = single$BestModelData,
cw1 = 0.95, cw2 = 0.5, cw3 = 0.25, title = "Mass")