boxcox_mle

mpsci.stats.boxcox_mle(x, lam0=0)

Maximum likelihood estimate of lambda in the Box-Cox transformation.

Parameters:
  • x (sequence of numbers) – The dataset for which the MLE of lambda is to be estimated.

  • lam0 (float) – The initial guess for the numerical procedure that computes lambda.

Returns:

lam – The estimate of the Box-Cox lambda parameter.

Return type:

mpmath.mpf

Examples

>>> from mpmath import mp
>>> mp.dps = 40
>>> from mpsci.stats import boxcox_mle
>>> x = [12.5, 13, 18.2, 20, 24.9, 25.3, 32.8]
>>> boxcox_mle(x)
mpf('0.1902293418567596520673395974496886925599866')