[SciPy-User] MLE with stats.lognorm
Christian K.
ckkart at hoc.net
Sun Oct 9 07:51:46 EDT 2011
Hi,
I wonder whether I am doing something wrong or if the following is to be
expected (using sciyp 0.9):
In [38]: from scipy import stats
In [39]: dist = stats.lognorm(0.25,scale=200.0)
In [40]: samples = dist.rvs(size=100)
In [41]: print stats.lognorm.fit(samples)
C:\Python26\lib\site-packages\scipy\optimize\optimize.py:280: RuntimeWarning:
invalid value encountered in subtract
and max(abs(fsim[0]-fsim[1:])) <= ftol):
(1.0, 158.90310231282845, 21.013288720647015)
In [42]: print stats.lognorm.fit(samples, floc=0)
[2.2059200167655884, 0, 21.013288720647015]
Even when fixing loc=0.0, the results from the MLE for s and scale are very
different from the input parameters. Is lognorm
Any hints are highly appreciated.
Best regards, Christian
More information about the SciPy-User
mailing list