Re: Fitting Explicit Functions
- To: mathgroup at smc.vnet.net
- Subject: [mg6845] [mg6845] Re: [mg6780] Fitting Explicit Functions
- From: jpk at max.mpae.gwdg.de
- Date: Thu, 24 Apr 1997 02:44:27 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
> Hello, > > I would like to fit some data to an implicit function. I have data for x and y > for the following equation: > > 1/x = exp( b*y/x ). > > I would like to fit for b. It appears that one cannot use the > Levenberg-Marquardt method in Mathematica because that method takes the > derivatives wrt the parameters explicitly. However, using the method of > steepest descent (FindMinimum), the derivatives are taken numerically, > so it should work. Nevertheless, I have not been able to do this. > > Below is an example. The data are such that the parameter b = -0.5. Does anyone > have any ideas of how to do this in Mathematica? > > Thanks in advance, > > Todd Culman > Physics Dept., > The Ohio State University > Hi Todd, try to fit instead of x against 1/x=xp, You can allways Solve Your equation with model= y /.Flatten[Solve[xp==Exp[b*y*xp],y]] and fit with NonlinearRegress[ data /. {x_?NumberQ,y_}:>N[{1/x,y}], model,{xp},{b,-.1,-2}] and You get beside som error messages b->-0.733333333. Hope that helps Jens