[Scipy-tickets] [SciPy] #1536: BUG: floc doesn't work (in lognorm) ?

SciPy Trac scipy-tickets@scipy....
Mon Oct 10 14:39:57 CDT 2011

```#1536: BUG: floc doesn't work (in lognorm) ?
-----------------------+----------------------------------------------------
Reporter:  josefpktd  |       Owner:  somebody
Type:  defect     |      Status:  new
Priority:  normal     |   Milestone:  Unscheduled
Component:  Other      |     Version:  0.9.0
Keywords:             |
-----------------------+----------------------------------------------------
(reported by Christian K on scipy-user mailing list)

while fit with starting value loc=0 gives reasonable results, the
estimates with fixed location, floc=0, look way off.

{{{
import numpy as np

from scipy import stats

np.set_printoptions(precision=4)
print 'true'
print 0.25, 0., 20.0
print 'estimated, floc=0, loc=0'
for i in range(10):
x = stats.lognorm.rvs(0.25, 0., 20.0, size=2000)
print np.array(stats.lognorm.fit(x, floc=0)), \
np.array(stats.lognorm.fit(x, loc=0))
}}}

{{{
true
0.25 0.0 20.0
estimated, floc=0, loc=0
[ 2.1271  0.      2.3999] [  0.2623   1.0211  18.7911]
[ 2.1393  0.      2.3952] [  0.2523   0.0294  20.0117]
[ 2.1356  0.      2.3978] [  0.2477   0.03    19.9703]
[ 2.1378  0.      2.3874] [  0.2496   0.0301  19.9231]
[ 2.1463  0.      2.3641] [  0.2474   0.0292  19.9051]
[ 2.1408  0.      2.3898] [  0.2459   0.0303  20.0118]
[ 2.1252  0.      2.4326] [  0.251    0.029   20.0412]
[ 2.1296  0.      2.3943] [  0.2476   0.0296  19.8208]
[ 2.1344  0.      2.401 ] [  0.2472   0.0299  19.9744]
[ 2.1383  0.      2.4133] [  0.247    0.0301  20.1544]
}}}

--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1536>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
```

More information about the Scipy-tickets mailing list