Skip to content

Commit

Permalink
fix stability MAN page
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Sep 9, 2024
1 parent b97bee0 commit 5cbc5e6
Show file tree
Hide file tree
Showing 14 changed files with 178 additions and 63 deletions.
78 changes: 58 additions & 20 deletions R/stability.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,20 @@
#' \deqn{
#' [2~det(A) (A^{-1})^T] \quad
#' }
#' \item `prop_cov`: Sensitivity of \eqn{\Sigma_{\infty}} to intra-series error correlations
#' \item `prop_cov_offdiag`: Sensitivity of \eqn{\Sigma_{\infty}} to intra-series error correlations
#' (i.e. how important are off-diagonal covariances in \eqn{\Sigma} for shaping
#' \eqn{\Sigma_{\infty}}?), calculated as the relative magnitude of the *off-diagonals* in
#' the partial derivative matrix:
#' \deqn{
#' [2~det(\Sigma_{\infty}) (\Sigma_{\infty}^{-1})^T] \quad
#' }
#' \item `prop_cov_diag`: Sensitivity of \eqn{\Sigma_{\infty}} to inter-series error variances
#' (i.e. how important are diagonal variances in \eqn{\Sigma} for shaping
#' \eqn{\Sigma_{\infty}}?), calculated as the relative magnitude of the *diagonals* in
#' the partial derivative matrix:
#' \deqn{
#' [2~det(\Sigma_{\infty}) (\Sigma_{\infty}^{-1})^T] \quad
#' }
#' \item `reactivity`: A measure of the degree to which the system moves
#' away from a stable equilibrium following a perturbation
#' values `> 0` suggest the system is reactive, whereby a
Expand Down Expand Up @@ -102,30 +109,61 @@
#' # Proportion of stationary forecast distribution
#' # attributable to lagged interactions
#' hist(metrics$prop_int,
#' xlim = c(0, 1),
#' xlab = 'Prop_int',
#' main = '',
#' col = '#B97C7C',
#' border = 'white')
#' xlim = c(0, 1),
#' xlab = 'Prop_int',
#' main = '',
#' col = '#B97C7C',
#' border = 'white')
#'
#' # Proportion of stationary forecast distribution
#' # attributable to correlated process errors
#' hist(metrics$prop_env,
#' xlim = c(0, 1),
#' xlab = 'Prop_env',
#' main = '',
#' col = '#B97C7C',
#' border = 'white')
#' # Within this contribution of interactions, how important
#' # are inter-series interactions (offdiagonals of the A matrix) vs
#' # intra-series density dependence (diagonals of the A matrix)?
#' layout(matrix(1:2, nrow = 2))
#' hist(metrics$prop_int_offdiag,
#' xlim = c(0, 1),
#' xlab = '',
#' main = 'Inter-series interactions',
#' col = '#B97C7C',
#' border = 'white')
#'
#' hist(metrics$prop_int_diag,
#' xlim = c(0, 1),
#' xlab = 'Contribution to interaction effect',
#' main = 'Intra-series interactions (density dependence)',
#' col = 'darkblue',
#' border = 'white')
#' layout(1)
#'
#' # How important are inter-series error covariances
#' # (offdiagonals of the Sigma matrix) vs
#' # intra-series variances (diagonals of the Sigma matrix) for explaining
#' # the variance of the stationary forecast distribution?
#' layout(matrix(1:2, nrow = 2))
#' hist(metrics$prop_cov_offdiag,
#' xlim = c(0, 1),
#' xlab = '',
#' main = 'Inter-series covariances',
#' col = '#B97C7C',
#' border = 'white')
#'
#' hist(metrics$prop_cov_diag,
#' xlim = c(0, 1),
#' xlab = 'Contribution to forecast variance',
#' main = 'Intra-series variances',
#' col = 'darkblue',
#' border = 'white')
#' layout(1)
#'
#' # Reactivity, i.e. degree to which the system moves
#' # away from a stable equilibrium following a perturbation
#' # (values > 1 suggest a more reactive, less stable system)
#' hist(metrics$reactivity,
#' main = '',
#' xlab = 'Reactivity',
#' col = '#B97C7C',
#' border = 'white',
#' xlim = c(-1*max(abs(metrics$reactivity)),
#' max(abs(metrics$reactivity))))
#' main = '',
#' xlab = 'Reactivity',
#' col = '#B97C7C',
#' border = 'white',
#' xlim = c(-1*max(abs(metrics$reactivity)),
#' max(abs(metrics$reactivity))))
#' abline(v = 0, lwd = 2.5)
#' }
#'@export
Expand Down
Binary file modified docs/reference/Rplot001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/stability.mvgam-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/stability.mvgam-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/stability.mvgam-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/stability.mvgam-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/stability.mvgam-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 62 additions & 23 deletions docs/reference/stability.mvgam.html

Large diffs are not rendered by default.

78 changes: 58 additions & 20 deletions man/stability.mvgam.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified src/mvgam.dll
Binary file not shown.

0 comments on commit 5cbc5e6

Please sign in to comment.