RelativeRisk#

class rojak.turbulence.analysis.RelativeRisk(this_feature, other_feature, sum_over_dims='time', use_log=True)[source]#

Relative risk (see rojak.turbulence.metrics.relative_risk()) between two boolean features

Parameters:
__init__(this_feature, other_feature, sum_over_dims='time', use_log=True)[source]#
Parameters:
  • this_feature (DataArray) – First binary variable (the exposure)

  • other_feature (DataArray) – Second binary variable (the outcome)

  • sum_over_dims (str | list[str] | None) – Dimension(s) to sum over when computing the contingency table. Defaults to "time".

  • use_log (bool) – If True (default), computes the natural logarithm of the relative risk.

Return type:

None

Methods

__init__(this_feature, other_feature[, ...])

execute()

Compute the (log) relative risk between self._this_feature and self._other_feature