Used in conf/functions.R to calculate the "trend" dimension of OHI scores. Trend is calculated as the proportional change in status across time using a linear regression model. Typically five year periods are used, but this can be changed if other periods are more appropriate. For example, for some climate variables, longer time periods might be better to assess long-term climate change.

CalculateTrend(status_data, trend_years = trend_years)

Arguments

status_data

data frame that includes variables: rgn_id (or, region_id), year, status

trend_years

list of the years used to calculate trend, usually five years (e.g., 2001:2005)

Value

Returns an internally used dataframe with region_id, score (i.e., calculated trend values), and dimensionan (i.e., "trend") #'

Examples

# NOT RUN {
# }