Description Usage Arguments Details See Also
View source: R/slr_change_comp.R
Compares the recent rate of sea level rise to rates for all prior periods of the same length.
1 2 3 4 5 6 7 8 9 10 | slr_change_comp(
.data,
.sl,
.dt,
.span = 20L,
.interval = if (.mode == "year") 1L else NULL,
.mode = c("year", "duration", "count"),
.threshold = 0.75,
t_fit = FALSE
)
|
.data |
Source data frame for data. Use NULL if no data frame is used and all data is passed from the enclosing environment. |
.sl |
The data variable (usually found in the data frame) showing sea level or mean sea level. Must be a named variable, not an expression. |
.dt |
Data variable containing corresponding midpoint dates for the
period of averaging used to calculate .sl. Must be a named variable,
not an expression. Midpoint dates for a given month can be approximated
with |
.span |
Span defining the "recent" period for fitting the model.
integer or difftime object. Interpretation of .span depends on the
value of the by_year. If |
.interval |
Integer. Spacing of the start of time periods
on which to calculate slopes. For |
.mode |
one of c('year', 'duration', 'count') indicating whether the .span
is expressed in years, time coordinates, or number of observations.
If |
.threshold |
Default = 0.75. Real number specifying how strict the
function should be in estimating slopes for periods with missing
values. Slopes will only be estimated for time periods with at least
|
t_fit |
Should the underlying generalized linear model's correlation structure be fit based on the time coordinate (.dt), or only on the sequence of observations in the data? Setting this to TRUE is safer if you are uncertain of the sequence of observations in the source data, or significant missing values in the data, but it significantly slows model fitting. Results tend to be very similar for complete or near complete data. |
A frequent question raised in analysis of recent sea level records is whether the rate of sea level rise is increasing, as predicted by numerous climate models over the years. This is a simple question that is rather more complex to answer statistically than it at first appears.
This function compares the rate of sea level rise in the most recent period
(defined by .span
) to the rate of sea level rise in prior periods of
the same length in the historic record.
This function returns a probability that corresponds to the percentage of prior evaluates periods with a slope equal to or greater than the most recent slope.
While conceptually, this is akin to a p-value, with the null hypothesis that the current period is drawn from the same distribution as all prior slopes, it should not be interpreted strictly. Consecutive slopes are strongly auto-correlated. This analysis makes no effort to account for that autocorrelation.
Other sea level rate functions:
get_sl_trend()
,
slr_change()
,
slr_slope()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.