View source: R/trendAnalysis.R
plot.trend | R Documentation |
The function plots an estimated trend or index, as well as estimates of any temporal random effects included in the trend term.
## S3 method for class 'trend'
plot(
x,
ciBase = NULL,
alpha = 0.05,
ylab = "abundance index",
trendCol = "black",
lineCol = adjustcolor("black", alpha.f = 0.05),
shadeCol = adjustcolor("#0072B2", alpha.f = 0.4),
incCol = "#009E73",
decCol = "#D55E00",
plotGrid = TRUE,
plotLines = FALSE,
ranef = "pointCI",
secDeriv = TRUE,
...
)
x |
A fitted object of class trend. |
ciBase |
A time point or function used to compute the baseline of the trend.
If the argument is numeric, the point in the trendGrid argument of the function |
alpha |
The alpha level of confidence intervals. |
ylab |
The label of the y-axis. |
trendCol |
The color of the trend line. |
lineCol |
The color of bootstrapped trend lines, if plotted. |
shadeCol |
The color of the confidence region. |
incCol |
The color of regions where the first or second derivative is significantly increasing. |
decCol |
The color of regions where the first or second derivative is significantly decreasing. |
plotGrid |
If true, grid lines are plotted. |
plotLines |
If true, the bootstrapped trends are plotted. |
ranef |
String indicating whether to plot point estimates and/or confidence intervals for random effects. One of 'pointCI', 'point', 'CI' or 'no'. |
secDeriv |
If true, coloured boxes at the bottom of the plot shows segments where the second derivative of the smooth is significantly different from zero. |
... |
Further arguments passed to |
Trends and indexes are relative measures and therefore are compared against some reference value. By default, the first observed time point is used as the reference value.
If the estimated trend contains bootstrap samples, confidence intervals are plotted as well. For smooth trend models, time periods where the trend is significantly declining or increasing are marked with a different color (set by arguments decCol and incCol). Periods where the second derivative is significantly positive or negative are marked by coloured boxes at the bottom of the plot.
There is an additional option of plotting each of the bootstrapped trends.
Jonas Knape
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.