hopsy.mcse#

class hopsy.mcse(data, series=0, method='mean', prob=None, dask_kwargs=None)#

Calculate Markov Chain Standard Error statistic.

Parameters:
  • data (numpy.ndarray) – MCMC samples with data.shape == (n_chains, n_draws, dim).

  • series (int) – Compute a series of statistics every series samples, so mcse will be computed for data[:,:n] for n in range(series, n_draws+1, series). For the default value series==0, mcse will be computed only once for the whole data.

  • method (str) – Select mcse method. Valid methods are: - “mean” - “sd” - “median” - “quantile”

  • prob (float) – Quantile information.

  • n_procs (int = 1) – In combination with “series”: compute series of mcse in parallel using n_procs subprocesses.

  • dask_kwargs (dict, optional) – Dask related kwargs passed to wrap_xarray_ufunc().

Returns:

Return the msce dataset

Return type:

numpy.ndarray

References