status {ecorisk} | R Documentation |
Compute Status Scores from Time Series Data
Description
The status
function assesses whether a state indicator is in a desired
or undesired status during the assessment time period. For this the function
compares the current conditions to the baseline conditions. The user specifies
whether the mean of the current conditions should be within or outside of a
specific deviation from the baseline mean.
Usage
status(
indicator_time_series,
base_years = NULL,
base_years_by_ind = NULL,
current_years = NULL,
current_years_by_ind = NULL,
range = "sd",
sign = "+",
condition = ">"
)
Arguments
indicator_time_series |
A data frame with time series per state indicator. The first column MUST be the time column. |
base_years |
A vector with two numerics, specifying the time period for the baseline.
The first one |
base_years_by_ind |
A data frame, specifying the baseline years for each state
indicator individually, by setting the starting year (second column)
and the end year (third column). The first column must contain the
names of the state indicators used in |
current_years |
A vector with two numerics, specifying the time period for
the assessment period. The first one |
current_years_by_ind |
A data frame, specifying the assessment period years
for each state indicator individually, by setting the starting year (second column)
and the end year (third column). The first column must contain the
names of the state indicators used in |
range |
A vector specifying the allowed deviance from the baseline mean.
Can be |
sign |
A character vector containing |
condition |
A character vector containing |
Details
With range
, sign
and condition
one defines good status
for the state indicators. By default the function evaluates whether the current
mean is above +1 standard deviation, if yes the status will be set to desired.
If the state should be within a range of ± standard deviation and not below that,
then the arguments sign
and condition
must be set to '-' and '>', this specifies
that the current mean must be higher than the mean of the baseline period - 1 standard
deviation to be considered as good status.
Value
a data frame containing the indicator name its status and the associated score, which will be added to the indicators vulnerability to derive the risk.
See Also
model_exposure
, model_sensitivity
,
vulnerability
, risk
Examples
### Demo with the internal dataset 'indicator_ts_baltic'
# Define a general baseline and current assessment period:
status(
indicator_time_series = indicator_ts_baltic,
base_years = c(start = 1984, end = 2010),
current_years = c(start = 2011, end = 2016)
)
# Define indicator-specific baseline and current assessment periods:
status(
indicator_time_series = indicator_ts_baltic,
base_years_by_ind = data.frame(
ind =c("zooplankton_mean_size", "eastern_baltic_cod"),
start = c(1984, 1990), end = c(2010, 2010)
),
current_years_by_ind = data.frame(
ind =c("zooplankton_mean_size", "eastern_baltic_cod"),
start = c(2011, 2012), end = c(2016, 2016)
)
)