trend | R Documentation |
Calculates correlation measures between observed and predicted stock trends.
trend(obs, hat)
obs |
Numeric vector of observed time series (e.g., biomass index) |
hat |
Numeric vector of predicted time series |
Data.frame containing:
pearson: Pearson correlation coefficient
spearman: Spearman's rank correlation
direction: Proportion of matching inter-annual change directions
obs_trend <- cumsum(rnorm(20))
pred_trend <- obs_trend + rnorm(20, sd=0.5)
trend(obs_trend, pred_trend)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.