expyfun.analyze.logit

expyfun.analyze.logit(prop, max_events=None)[source]

Convert proportion (expressed in the range [0, 1]) to logit.

Parameters:
propfloat | array-like

the occurrence proportion.

max_eventsint | array-like | None

the number of events used to calculate prop. Used in a correction factor for cases when prop is 0 or 1, to prevent returning inf. If None, no correction is done, and inf or -inf may result.

Returns:
lgtnumpy.ndarray, with shape matching numpy.array(prop).shape.