Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FindFit, Weibull

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92942] Re: FindFit, Weibull
  • From: jerry <jerry45632 at yahoo.com>
  • Date: Mon, 20 Oct 2008 07:35:52 -0400 (EDT)
  • References: <gd703r$i8a$1@smc.vnet.net> <gdcdhg$fkn$1@smc.vnet.net>

For some reason I can't get either of your examples to run 
on my V6.03. I get this error:

FindFit::fitd: First argument praxis in Fit is not a list or 
a \rectangular array. >>

> For parameters that must be positive, I routinely solve
> for their logs, without constraints, and then exponentiate,
> as in the following code. The values differ only trivially
> from those that Darren got using constraints.
> 
> Block[{a,b}, {a,b} = {Exp@a,Exp@b} /. FindFit[praxis,
> CDF[WeibullDistribution[Exp@a,Exp@b],x],{{a,0},{b,4}},{x}];
> Plot[CDF[WeibullDistribution[a,b],x],{x,0,140}, Frame->True,
> PlotRange->{-.0001,1}, Prolog->{PointSize[.02], Point/@praxis}];
> {Norm[CDF[WeibullDistribution[a,b],praxis[[All,1]]] -
>       praxis[[All,2]]], {a,b}}]
> 
> <<plot omitted>>
> 
> {0.0567336,{1.52052,77.4768}}
> 
> However, I have to wonder about your choice of a distribution.
> Adding  a shift parameter, that for this data puts time-zero
> some time before you started your clock, reduces the rms error
> by 40%. Does this make any sense in terms of the problem?
> 
> Block[{a,b,c}, {a,b,c} = {Exp@a,Exp@b,c} /. FindFit[praxis,
> CDF[WeibullDistribution[Exp@a,Exp@b],x+c],{{a,0},{b,4},{c,0}},{x}];
> Plot[CDF[WeibullDistribution[a,b],x+c],{x,0,140}, Frame->True,
> PlotRange->{-.0001,1}, Prolog->{PointSize[.02], Point/@praxis}];
> {Norm[CDF[WeibullDistribution[a,b],praxis[[All,1]]+c] -
>       praxis[[All,2]]], {a,b,c}}]
> 
> <<plot omitted>>
> 
> {0.0340676, {2.32031, 107.905, 28.9873}}
> 


  • Prev by Date: MatrixPlot: color scale
  • Next by Date: Re: notation using # with exponents and &
  • Previous by thread: Re: FindFit, Weibull
  • Next by thread: Hubble's Constant