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

Home » Public Forums » archive » multiple linear regression
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
multiple linear regression [message #37577] Fri, 09 January 2004 02:33 Go to next message
sese is currently offline  sese
Messages: 1
Registered: January 2004
Junior Member
I'm using REGRESS to perform a multiple linear regression, but I need a
solution with all the coefficients positive. Is there a routine similar to
regress allowing only non-negative solutions?
Re: Multiple linear regression [message #67407 is a reply to message #37577] Sun, 26 July 2009 07:21 Go to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Sat, 25 Jul 2009 15:10:11 -0700 (PDT), Rukasu83
<lsevillagarcia@gmail.com> wrote:

> Hi everyone, uhm it's the first time I use this page to ask something,
> so I don't if my question will be too long for an answer, but anyway
> if anyone can help me with just a anything, I would appreciate so
> much. The things is, I'm starting with IDL so I'm a little bit lost.
> Could anyone tell how can I apply a multiple linear regression
> function to procedure that read an ascii file that contains five
> columns (id of meteorology station, temperature, latitude, longitude
> and altitude) and 3 rows of numers. I was able to open and read the
> file but I can't "connect" the function and the procedure, and I'm
> losing my ideas :( . So, if anyone can help, that would be great.
> Thank you.
>
> Lucas

Look for the REGRESS function in IDL's help.
Re: Multiple linear regression [message #67408 is a reply to message #37577] Sun, 26 July 2009 06:17 Go to previous message
Rukasu83 is currently offline  Rukasu83
Messages: 2
Registered: July 2009
Junior Member
On 26 jul, 00:21, David Fanning <n...@dfanning.com> wrote:
> Rukasu83 writes:
>> Hi everyone, uhm it's the first time I use this page to ask something,
>> so I don't if my question will be too long for an answer, but anyway
>> if anyone can help me with just a anything, I would appreciate so
>> much. The things is, I'm starting with IDL so I'm a little bit lost.
>> Could anyone tell how can I apply a multiple linear regression
>> function to procedure that read an ascii file that contains five
>> columns (id of meteorology station, temperature, latitude, longitude
>> and altitude) and 3 rows of numers. I was able to open and read the
>> file but I can't "connect" the function and the procedure, and I'm
>> losing my ideas :( . So, if anyone can help, that would be great.
>
> Wait. Let's start at the beginning. Five columns and three
> *ROWS* of numbers, and we want to do multiple linear regression!?
> On what, exactly? :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Hi David, uhm ok, I'll explain what I want to do. (I'm spanish so,
sorry my english is not so good hehe). I need to make a climate model
for a work in my postgrade. And I have to do it in IDL. But I'm a
beginner with IDL, so my first goal is to make a code for a very
simple climate model, in a way to get used to IDL. I'll start with a
file that contains information of three climate station. Each climate
station has information of Temperature, latitude, longitude and
altitude, something like that:

Station Temperature Latitude Longitude Altitude
1 y1 x1 x2 x3
2 y1 x1 x2 x3
3 y1 x1 x2 x3

From this three stations, a want to interpolate temperature for an
area. This area will be a DEM (digital elevation model, is that
right?) I previously created in ENVI. The final result will be a
temperature image with the size of the DEM file. I hope I could
express more or less in a clear way what I need to do.

What I've done so far, it's open the file with data of stations and
read it. However I did it so simple, with this orders:

header = strarr(1)
readf, lun, header
print, header

data = fltarr (5,3)
readf, lun, data
print, data

Once I have my data, my next step would be to apply this data to a
regression model:

Y= aX1+bX2+cX3+d where X1= latitude X2=longitude X3= altitude

With the regression model I would like to obtain a,b,c and d
constants. So, if I have these constants I will able to introduce all
the values from each pixel of my DEM in my regression equation and
obtain Temperature for the whole DEM. Well, the values I would get
from each pixel would be

Latitude = x value
Longitude = y value
Altitude = a value between 0 and 255.

So, this is what I'm working in and that's why I asked in these group
about the possibily of use a regress function in a procedure. By the
way, I checked your webpage, and it's soooo cool, really,it's very
helpful. There is one example to read ascii file I try to use it in my
procedure that help me a lot to understand IDL. It's great to have
people in internet like you so helpful hehe. Anyway, thanks for asking
and any help hehe.
regards

Lucas
Re: Multiple linear regression [message #67410 is a reply to message #37577] Sat, 25 July 2009 15:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rukasu83 writes:

> Hi everyone, uhm it's the first time I use this page to ask something,
> so I don't if my question will be too long for an answer, but anyway
> if anyone can help me with just a anything, I would appreciate so
> much. The things is, I'm starting with IDL so I'm a little bit lost.
> Could anyone tell how can I apply a multiple linear regression
> function to procedure that read an ascii file that contains five
> columns (id of meteorology station, temperature, latitude, longitude
> and altitude) and 3 rows of numers. I was able to open and read the
> file but I can't "connect" the function and the procedure, and I'm
> losing my ideas :( . So, if anyone can help, that would be great.

Wait. Let's start at the beginning. Five columns and three
*ROWS* of numbers, and we want to do multiple linear regression!?
On what, exactly? :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: font size in help window?
Next Topic: JAVA Bridge Error Handling Question

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

Current Time: Wed Oct 08 19:35:20 PDT 2025

Total time taken to generate the page: 0.00781 seconds