Re: Extract parameters from FIndFit output
- To: mathgroup at smc.vnet.net
- Subject: [mg107562] Re: Extract parameters from FIndFit output
- From: Arnold Smit <arnold.smit at ziggo.nl>
- Date: Wed, 17 Feb 2010 07:02:32 -0500 (EST)
- References: <hl0opp$t47$1@smc.vnet.net>
Frank, There are some strange characters in your mail, but say your parameters are called mu and sd, then what you get is a list of rules: In: fitLogNormal // FullForm Out: List[Rule[mu, 3.4773291281865117`], Rule[b, 1.1977331975446315`]] - The first element is a Rule In: fitLogNormal[[1]] // FullForm Out: Rule[mu, 3.4773291281865117`] - You can get to any part of any expression by indexing, f.i. In: fitLogNormal[[1]][[0]] (* equivalent to fitLogNormal[[1,0]] *) Out: Rule In: fitLogNormal[[1]][[1]] Out: mu In: fitLogNormal[[1,2]] Out: 3.47733 - So the simplest way to get to your parameter values is probably: In: fitLogNormal[[All, 2]] Out: {3.47733, 1.19773} Hope this helps, grtz Arnold On 11-2-2010 12:14, Frank Letkiewicz 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. >