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 
Return to the default flat view Create a new topic Submit Reply
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)
[Message index]
 
Read Message
Read Message
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: Sun Oct 12 00:27:10 PDT 2025

Total time taken to generate the page: 0.56062 seconds