pypomp.maths.logmeanexp_se

pypomp.maths.logmeanexp_se(x: Any, axis: None = None, ignore_nan: bool = False) float[source]
pypomp.maths.logmeanexp_se(x: Any, axis: int, ignore_nan: bool = False) ndarray

Compute a jackknife standard error for the logmeanexp() estimator.

Estimates the standard error of the log-likelihood estimate produced by logmeanexp() using the jackknife (leave-one-out) method.

Note

numpy.std divides by n (MLE), whereas R’s sd divides by n - 1 (unbiased). This function matches the NumPy convention, so results will differ slightly from R’s pomp::logmeanexp SE output.

Parameters:
  • x (array-like) – Collection of log-likelihood values.

  • axis (int or None, optional) – Axis along which to compute the SE. If None (default), compute over the entire array.

  • ignore_nan (bool, optional) – If True, remove NaN entries before computing. Defaults to False.

Returns:

The jackknife standard error. np.nan if fewer than 2 values are present.

Return type:

float or np.ndarray

See also

logmeanexp

The estimator whose SE this computes.