[Scipy-tickets] [SciPy] #422: exponweib.stats

SciPy scipy-tickets@scipy....
Thu May 17 15:21:18 CDT 2007


#422: exponweib.stats
-------------------------+--------------------------------------------------
 Reporter:  dhuard       |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:          
Component:  scipy.stats  |     Version:          
 Severity:  normal       |    Keywords:          
-------------------------+--------------------------------------------------
 exponweib.stats(2,3) returns
 {{{
 exceptions.ValueError                                Traceback (most
 recent call last)

 /home/huardda/science_svn/pymc/trial/PyMC2/<ipython console>

 /usr/local/lib/python2.4/site-packages/scipy/stats/distributions.py in
 stats(self, *args, **kwds)
     644         if 'm' in moments:
     645             if mu is None:
 --> 646                 mu = self._munp(1.0,*goodargs)
     647             out0 = default.copy()
     648             place(out0,cond,mu*scale+loc)

 /usr/local/lib/python2.4/site-packages/scipy/stats/distributions.py in
 _munp(self, n, *args)
     387     #  Central moments
     388     def _munp(self,n,*args):
 --> 389         return self.generic_moment(n,*args)
     390
     391     def __fix_loc_scale(self, args, loc, scale):

 /usr/local/lib/python2.4/site-packages/numpy/lib/function_base.py in
 __call__(self, *args)
     898         if self.nin:
     899             if (nargs > self.nin) or (nargs <
 self.nin_wo_defaults):
 --> 900                 raise ValueError, "mismatch between python
 function inputs"\
     901                       " and received arguments"
     902

 ValueError: mismatch between python function inputs and received arguments
 }}}
 I found a paper with a direct formula for the moments. Would that be
 useful ? Here is the reference :
 {{{
 TY  - JOUR
 JF  - Metrika
 T1  - A Simple Derivation of Moments of the Exponentiated Weibull
 Distribution
 VL  - 62
 IS  - 1
 SP  - 17
 EP  - 22
 PY  - 2005/09/01/
 UR  - http://dx.doi.org/10.1007/s001840400351
 M3  - 10.1007/s001840400351
 AU  - Choudhury, Amit
 N2  - The Exponentiated Weibull family is an extension of the Weibull
 family obtained by adding an additional shape parameter. The beauty and
 importance of this distribution lies in its ability to model monotone as
 well as non-monotone failure rates which are quite common in reliability
 and biological studies. As with any other distribution, many of its
 interesting characteristics and features can be studied through moments.
 Presently, moments of this distribution are available only under certain
 restrictions. In this paper, a general derivation of moments without any
 restriction whatsoever is proposed. A compact expression for moments is
 presented.
 }}}

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


More information about the Scipy-tickets mailing list