statsmodels.robust.scale.MScale.fit#

MScale.fit(data, start_scale='mad', maxiter=100, rtol=1e-06, atol=1e-08)[source]#

Estimate M-scale using iteration

Parameters:
dataarray_like

Data, currently assumed to be 1-dimensional.

start_scalestr or float

Starting value of scale or method to compute the starting value. Default is using ‘mad’, no other string options are available.

maxiterint

Maximum number of iterations.

rtolfloat

Relative convergence tolerance.

atolfloat

Absolute convergence tolerance.

Returns:
float

Scale estimate. The estimated variance is scale squared.

Notes

TODO: switch to Holder instance with more information.