comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help: multiple linear regression fit
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Help: multiple linear regression fit [message #36185] Tue, 12 August 2003 19:54
fishdick91 is currently offline  fishdick91
Messages: 2
Registered: August 2003
Junior Member
Craig Markwardt <craigmnet@cow.physics.wisc.edu> wrote in message news:<onoeyurhtw.fsf@cow.physics.wisc.edu>...
> And what of the MPFIT family of functions? Using the driver
> MPFITEXPR, you can set up an expression that almost exactly matches
> Some people seem to resist using a non-linear regression tool for a
Yes, we once thought so, although my colleagues and I have used your
tools to fit all kinds of spectra lines. :)
Now it seems the time for us to change our mind, and use MPFITEXPR to
do 'linear regression' also.
Thank you, for your procedures and your advice.
Good luck,

Dick
> linear problem on the basis of, "it's *ONLY* linear regression!"
> Originally I might explain that the heart of any non-linear regression
> package is a linear solver, so it's really all the same. Recently I
> just shrug and say, "their loss."
>
> Happy fitting,
> Craig
>
> http://cow.physics.wisc.edu/~craigm/idl/idl.html (under fitting)
Re: Help: multiple linear regression fit [message #36195 is a reply to message #36185] Tue, 12 August 2003 08:55 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
fishdick91@hotmail.com (fishdick91@hotmail.com) writes:

> Hi everyone,
>
> I've set up a model: y = a1*x1 + a2*x2 + a3*x3 to fit my experiment
> data,
> and am using 'regress' function to perform this fit.
> However, the 'regress' function always return a big const which I
> don't need.
> So question 1:
> how can I fix the const when fitting?

And what of the MPFIT family of functions? Using the driver
MPFITEXPR, you can set up an expression that almost exactly matches
your case:

EXPR = 'P(0)*X(*,0) + P(1)*X(*,1) + P(2)*X(*,2)'

(of course you need the core routine MPFIT too). You would need to
set up X as an Nx3 array, and Y as an N-vector.

Some people seem to resist using a non-linear regression tool for a
linear problem on the basis of, "it's *ONLY* linear regression!"
Originally I might explain that the heart of any non-linear regression
package is a linear solver, so it's really all the same. Recently I
just shrug and say, "their loss."

Happy fitting,
Craig

http://cow.physics.wisc.edu/~craigm/idl/idl.html (under fitting)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Getting the errors on the fitted parameters using mpfit2dpeak
Next Topic: Re: 32bit to 64bit conversion

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:56:18 PDT 2025

Total time taken to generate the page: 0.00381 seconds