Help: multiple linear regression fit [message #36201] |
Tue, 12 August 2003 06:22 |
fishdick91
Messages: 2 Registered: August 2003
|
Junior Member |
|
|
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?
question 2:
I've tried SVD method (a modified version of SVDFIT which IDL
provided). In principle, the SVD method should give the golobal
chi-squre minimum solution.
But in fact, it's not! ( I've checked using Matlab.)
Why?
After failing in using those two IDL functions, REGRESS, SVDFIT, I
have to resort to Matlab to do the constrained multiple linear
regression, since the constrained_min procedure in IDL is not good. I
find lsqlin() in Matlab.
// LSQLIN: to do the constrained Least SQaures LINear fitting.
So comes my question 3:
Does IDL has the procedure similiar to lsqlin()?
Thanks in advance!
fishmaker: Dick
---
P.S. an old post I searched:
From: joe@degsyd.syd.deg.csiro.au (joe@degsyd.syd.deg.csiro.au)
Subject: need constrained SVD code in IDL :)
This is the only article in this thread
View: Original Format
Newsgroups: comp.lang.idl-pvwave
Date: 1991-10-25 08:14:28 PST
Has anyone in the IDL/PV~Wave world written, and would like to share,
an SVD-based least-squares fitting procedure that allows the user
to constrain the solutions with linear inequality and equality
constraints?
I am aware of the IDL SVD routines, but I want to restrict the
solution
space in the following manner:
1) all returned values must be .GE. zero
2) the sum of the returned values must be .LE. 1.
I tried "translating" Lawson and Hansen NNLS code into IDL but I
got slow and unreliable results. (probably because of all the DO loops
and my "interpretation" of what their code actually does.:)
Any help on this would be greatly appreciated.
--
JOSEPH WILLIS BOARDMAN "woof",Riley
Email: joe@syd.deg.csiro.au
Phone: 61-2-887-8884
|
|
|