Re: Fit in Excel Mathlink
- To: mathgroup at smc.vnet.net
- Subject: [mg5084] Re: Fit in Excel Mathlink
- From: rubin at msu.edu (Paul A. Rubin)
- Date: Fri, 25 Oct 1996 22:48:45 -0400
- Organization: Michigan State University
- Sender: owner-wri-mathgroup at wolfram.com
In article <53gpva$5am at dragonfly.wolfram.com>, Mark Dowell <mark.dowell at jrc.it> wrote: ->Dear All, -> ->Can anyone hellp I'm trying to fit some data under Excel with the Mathlink ->addon the fitting equation is -> ->y=a(0)*Exp(-a(1)*(x-400))+a(2) -> ->I just need value for best fit in a(0),a(1),a(2). for a given range in Excel ->cells can anyone help with the syntax -> ->Mark ->Mark Dowell Ispra, I-21020, (VA) ->Marine Environment Unit TP 272 Italy. ->Space Applications Institute E-mail: mark.dowell at jrc.it ->Joint Research Centre Talk: dowell at biscay.jrc.it ->Ispra Site Phone: +39-332-789873 ->Commission of the European Communities Fax: +39-332-789034 If you're already in Excel, and you just want the parameter estimates, and assuming that you want least squares estimates (not maximum likelihood), why not set up a cell containing the sum of squared errors and use the Excel Solver to minimize it? Since nonlinear fits are sensitive to starting estimates for the parameters, it would help to have good initial guesses. You might want to try a lit search on "exponential peeling" and see if you can come up with a reference. As I recall (and this dates back a couple of decades), it's a method for fitting sums of decaying exponentials to data. Your model is a special case in that the second term is a constant (or a decaying exponential that doesn't decay much :-). -- Paul ************************************************************************** * Paul A. Rubin Phone: (517) 432-3509 * * Department of Management Fax: (517) 432-1111 * * Eli Broad Graduate School of Management Net: RUBIN at MSU.EDU * * Michigan State University * * East Lansing, MI 48824-1122 (USA) * ************************************************************************** Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. J. W. v. GOETHE