Re: findfit or solve?
- To: mathgroup at smc.vnet.net
- Subject: [mg55035] Re: [mg55013] findfit or solve?
- From: DrBob <drbob at bigfoot.com>
- Date: Thu, 10 Mar 2005 05:24:42 -0500 (EST)
- References: <200503091134.GAA07043@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
It helps to write the model in Mathematica notation. data = {{6.968, 117.1}, {7.967, 123.3}, {9.046, 129.4}, {9.982, 134.6}, {10.951, 139.2}, {11.973, 145.2}, {13.021, 151.1}, {13.892, 159.9}, {14.888, 167.8}, {15.858, 171.9}, {16.857, 175.7}, {17.854, 177.2}, {18.724, 175.6}}; constants = {a -> 176, b -> 160, c -> 0.1, d -> 14, e -> 1.2}; model = h1 - (2*(h1 - hθ))/(Exp[s0*(t - θ)] + Exp[s1*(t - θ)]); f = model /. constants; params = Complement[ Union[Cases[f, (x_Symbol)? ( !NumericQ[#1] & ), Infinity]], {t}]; NonlinearFit[data, f, {t}, params] 151.3846153846154 - 111410.8547029138/ (E^(-14.335393999263037* (-115.43433836614763 + t)) + E^(-14.335393999252005* (-115.43433836614763 + t))) Bobby On Wed, 9 Mar 2005 06:34:39 -0500 (EST), Tegla Bela <spiller at hotmail.co.jp> wrote: > Greetings to everybody, > > I have found a model and I would like to use Mathematica for the data under > the model. The model is as follows: > > = h1 - ((2 * (h1 - hθ)) / ((EXP(s0 * (t -θ))) + (EXP(s1 * (t -θ))))) > > data = {{6.968, 117.1}, {7.967, 123.3}, {9.046, > 129.4}, {9.982, 134.6}, {10.951, > 139.2}, {11.973, 145.2}, {13.021, 151.1}, {13.892, 159.9}, { > 14.888, 167.8}, {15.858, 171.9}, {16.857, 175.7}, {17.854, 177.2}, { > 18.724, 175.6}}; > > I have managed to do it with nonlinear least-square fitting in other > program. But not working for me in Mathematica. (I do not know how to give > initial values to have the five unknown parameters estimated) These are the > initial values that I would like to use: a=176, b=160, c=0.1, d=14, e=1.2 > (t is the age, first value in each pair of the data) > > Does anybody have idea how it can be done? Any help is appreciated. > > Spiller > > _________________________________________________________________ > æ?¥æ?¬å?½å??æ??大ç´?570ä¸?ã?¦ã?¼ã?¶ã?¼ã?®MSN Hotmail > https://registernet.passport.net/reg.srf?id=2&lc=1041 > > > > -- DrBob at bigfoot.com
- References:
- findfit or solve?
- From: "Tegla Bela" <spiller@hotmail.co.jp>
- findfit or solve?