[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: multiple non-linear regression analysis*From*: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>*Date*: 17 Apr 2001 16:29:32 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <6Y%C6.360$aC.145761@news.uswest.net>*Reply-To*: craigmnet(at)cow.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:24592

"Kenlo Nishida" <kenlo@ntsg.umt.edu> writes: > > How can I make multiple non-linear regression analysis with IDL? > I know "LMFIT" command can make a non-linear regression analysis > for a single independent variable. However, I want to know > an appropriate command or function of IDL which provide me with > a fitting of an arbitrary non-linear function with two or more > independent variables. I mean, I want to determine the following > three parameters (a, b, c): > > y=f(x1, x2, x3; a, b, c) > > Here x1, x2, and x3 are arrays of independent variables each > containing n data. y is an array of dependent variable with > n data. a, b, and c are scalars (parameters) which determine > the non-linear function f(x1, x2, x3). Similar questions and answers: http://cow.physics.wisc.edu/~craigm/idl/fitqa.html#multivar http://cow.physics.wisc.edu/~craigm/idl/archive/msg04249.html By the way, you should not use LMFIT for two reasons. The first reason is that LMFIT cannot handle more than one independent variable. The second is that LMFIT is very inefficient since it calls your function once for each data point, instead of as a vector. Use CURVEFIT (IDL built-in) or MPFITFUN+MPFIT from my web page. The MPFIT2DFUN function is a specialization for fitting images. The technique I refer to in these two articles is easy to implement. Since neither CURVEFIT nor MPFIT require any special structure for your independent variable, "X", you can in principle make it have any structure you'd like. In this case it would be a N_obs x 3 array, one row for each independent variable. Then in your fitting function you would break the array into its components again. Good luck, Craig Web page: http://cow.physics.wisc.edu/~craigm/idl/idl.html -- -------------------------------------------------------------------------- Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response --------------------------------------------------------------------------

**References**:**multiple non-linear regression analysis***From:*Kenlo Nishida

- Prev by Date:
**Re: something like perl's 'require 5.4'** - Next by Date:
**Re: multiple non-linear regression analysis** - Prev by thread:
**multiple non-linear regression analysis** - Next by thread:
**Re: multiple non-linear regression analysis** - Index(es):