Discussion:
[pystatsmodels] Missing scikits.statsmodels.sandbox.stats.distributions_patch
Daniel Shaw
2018-12-04 18:28:14 UTC
Permalink
Hi,

I've been trying to get the package
scikits.statsmodels.sandbox.stats.distributions_patch, posted to
stackoverflow here
<https://stackoverflow.com/questions/3242326/fitting-a-pareto-distribution-with-python-scipy>,
to run using Jupyter Notebook with a python 2.7 kernel but have not been
able to access the 'fit_fr' function. I've checked within the Notebook GUI
and underlying python installation and statsmodels (0.6.1) is installed. It
appears that the post was originally put out there 8 years ago and, I
think, in that time the 'statsmodels' was moved out of 'scikits' and into a
standalone package. I'm not sure if that has anything to do with what I'm
seeing. I did remove the 'scikits' portion of the import statement and that
changed the error from not being able to find the entire package, to not
being able to find the 'distributions_patch'.

Anyway, if someone could point me to the 'fit_fr' function, or point me to
a different function that approximates 'fit_fr', I would really appreciate
it.

Thanks,
Dan
Paul Hobson
2018-12-04 22:34:16 UTC
Permalink
Here's more recent example I found by searching the github repository for
"fit_fr".
https://github.com/statsmodels/statsmodels/blob/4c601f679913428e6feca44402de38997c69e08b/statsmodels/sandbox/distributions/examples/ex_fitfr.py

Perhaps that will help/.
Post by Daniel Shaw
Hi,
I've been trying to get the package
scikits.statsmodels.sandbox.stats.distributions_patch, posted to
stackoverflow here
<https://stackoverflow.com/questions/3242326/fitting-a-pareto-distribution-with-python-scipy>,
to run using Jupyter Notebook with a python 2.7 kernel but have not been
able to access the 'fit_fr' function. I've checked within the Notebook GUI
and underlying python installation and statsmodels (0.6.1) is installed. It
appears that the post was originally put out there 8 years ago and, I
think, in that time the 'statsmodels' was moved out of 'scikits' and into a
standalone package. I'm not sure if that has anything to do with what I'm
seeing. I did remove the 'scikits' portion of the import statement and that
changed the error from not being able to find the entire package, to not
being able to find the 'distributions_patch'.
Anyway, if someone could point me to the 'fit_fr' function, or point me to
a different function that approximates 'fit_fr', I would really appreciate
it.
Thanks,
Dan
j***@gmail.com
2018-12-04 22:42:31 UTC
Permalink
Hi,
I've been trying to get the package scikits.statsmodels.sandbox.stats.distributions_patch, posted to stackoverflow here, to run using Jupyter Notebook with a python 2.7 kernel but have not been able to access the 'fit_fr' function. I've checked within the Notebook GUI and underlying python installation and statsmodels (0.6.1) is installed. It appears that the post was originally put out there 8 years ago and, I think, in that time the 'statsmodels' was moved out of 'scikits' and into a standalone package. I'm not sure if that has anything to do with what I'm seeing. I did remove the 'scikits' portion of the import statement and that changed the error from not being able to find the entire package, to not being able to find the 'distributions_patch'.
Anyway, if someone could point me to the 'fit_fr' function, or point me to a different function that approximates 'fit_fr', I would really appreciate it.
Hi Dan,

This is very outdated information, i.e. status from 2010.

The fitting with fixed parameters has been added to the
scipy.stats.distributions, so that patch is also outdated. The
arguments are different from my original version.
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_continuous.fit.html
parameters can be fixed using keywords floc, fscale and for shape
parameters either with numbers or parameter name, e.g. f0, f1, or fa,
fx

There is still a module statsmodels.sandbox.distributions.sppatch.py
but that is not maintained because it is mostly obsolete with the
changes in scipy (and mostly I stopped working on `distributions` at
around 2010).
I don't know whether that still works with a current scipy.

Josef
Thanks,
Dan
Loading...