mesmer.stats.draw_auto_regression_correlated

mesmer.stats.draw_auto_regression_correlated#

mesmer.stats.draw_auto_regression_correlated(ar_params, covariance, *, time, realisation, seed, buffer, time_dim='time', realisation_dim='realisation')#

draw time series of an auto regression process with spatially-correlated innovations

Parameters:
  • ar_params (Dataset) – Dataset containing the estimated parameters of the AR process. Must contain the following DataArray objects:

    • intercept

    • coeffs

  • covariance (DataArray) – The (co-)variance array. Must be symmetric and positive-semidefinite.

  • time (int | DataArray | Index) – Defines the number of auto-correlated samples to draw and possibly its coordinates.

    • int: defines the number of time steps to draw

    • DataArray or Index: defines the coordinates and its length the number of samples along the time dimension to draw.

  • realisation (int | DataArray) – Defines the number of uncorrelated samples to draw and possibly its coordinates. See time for details.

  • seed (int) – Seed used to initialize the pseudo-random number generator.

  • buffer (int) – Buffer to initialize the autoregressive process (ensures that start at 0 does not influence overall result).

Returns:

out (DataArray) – Drawn realizations of the specified autoregressive process. The array has shape n_time x n_coeffs x n_realisations.

Notes

The number of (spatially-)correlated samples is defined by the size of ar_params (n_coeffs, i.e. the number of gridpoints) and covariance (which must be equal).