MathGroup Archive 2010

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

Search the Archive

Re: Extract parameters from FIndFit output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107439] Re: [mg107389] Extract parameters from FIndFit output
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 12 Feb 2010 04:45:14 -0500 (EST)
  • Reply-to: hanlonr at cox.net

xvalues = {3, 5, 12, 47, 81, 112, 129, 186};

yvalues = {0.05, 0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.99};

data = Thread[{xvalues, yvalues}];

You could also use Transpose in place of Thread

data == Transpose[{xvalues, yvalues}]

True

fitLogNormal = FindFit[data,
  CDF[LogNormalDistribution[m, s],  x],
  {m, s}, x] 

{m->3.47733,s->1.19773}

fitLogNormal is a list of replacement rules

m /. fitLogNormal

3.47733

fitLogNormal // First // Last

3.47733

Plot[
 CDF[LogNormalDistribution[m, s],  x] /.
  fitLogNormal,
 {x, 0, 200},
 Epilog -> {Red, AbsolutePointSize[4], Point[data]},
 PlotRange -> {0, 1}]


Bob Hanlon

---- Frank Letkiewicz <fjl3rd at mac.com> wrote: 

=============
Is it possible to extract the parameter values generated from FindFIt to 
use in other operations?

For example:

xvalues = {3, 5, 12, 47, 81, 112, 129, 186};
yvalues = {0.05, 0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.99};
data = Partition[Riffle[xvalues, yvalues], 2];
fitLogNormal = FindFit[data, CDF[LogNormalDistribution[=CE=BC, =CF=83], 
x], {=CE=BC, =CF=83}, x]

Out[396]= {=CE=BC -> 3.47733, =CF=83 -> 1.19773}

Can I extract these =CE=BC and =CF=83 values in the output as regular 
numbers? 

Frank L.



  • Prev by Date: Re: Upright \[Micro] in AxesLabel
  • Next by Date: Can I embed page breaks in a grid?
  • Previous by thread: Re: Extract parameters from FIndFit output
  • Next by thread: Re: Extract parameters from FIndFit output