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

Home » Public Forums » archive » regression with poisson models
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
regression with poisson models [message #25430] Sun, 17 June 2001 17:59 Go to previous message
matzke is currently offline  matzke
Messages: 1
Registered: June 2001
Junior Member
Hi,

...hope that you smart astronomy types can take a minute to answer a
question from a humble geographer.

I have been using the function REGRESS (IDL 5.4) to test correlations
between images derived from two different sensors (simply using each
pixel-pixel comparison as an observation). This works fine, but both
datasets appear to have poisson distributions rather than gaussian
distributions.

In S-plus 2000, it is a fairly simple matter to use the 'Statistics
--> Regression --> Generalized Linear Model' menu option, and change
the model for the data from Gaussian to Poisson. But there appears to
be no similar easy option for IDL REGRESS or similar functions. The
only relevant line that I could find in the IDL help files was this
(in the help entry for REGRESS):

===================
MEASURE_ERRORS

Set this keyword to a vector containing standard measurement errors
for each point Y[i]. This vector must be the same length as X and Y.

Note - For Gaussian errors (e.g., instrumental uncertainties),
MEASURE_ERRORS should be set to the standard deviations of each point
in Y. For Poisson or statistical weighting, MEASURE_ERRORS should be
set to SQRT(Y).
===================

...but if I just set the keyword MEASURE_ERRORS to SQRT(Y), I get
errors because of zeros in the array Y -- even once I got the
dimensions etc right.

Here's my workaround:

errorarray1[0:points2-1]=sqrt(abs(y[0:points2-1,0]))
errorarray1=errorarray1+0.0000001
...and then I use MEASURE_ERRORS=errorarray1. This code doesn't crash
(it does if the 0.0000001 isn't added), but this seems like a pretty
half-baked solution; plus I don't really have any idea if this is the
equivalent of assuming a poisson distribution rather than a normal
one.


Is there a simpler way to do a regression in IDL assuming
poisson-distributed data rather than normal distributions? Is what
I've got right now even doing this?



To Craig, who is I think the resident IDL genius:

I found the newsgroup from your webpage, & downloaded the programs for
image regression...I'll see if I can get them to work. Is there
perhaps a solution to my problem within one of the functions you've
created?



Back to the group:
Anyway, I hope this isn't too silly a question. Both my stats & IDL
skills are limited. I suppose I could learn the s-plus scripting
language, but I've spent the last few months learning IDL, & love it
for image analysis (along with ENVI), & would hate to have to learn a
whole 'nuther language just to solve this problem. I have a zillion
variations on these images to compare, so doing things manually in
S-plus doesn't seem like a likely option.


Thanks, Nick

PS:
Why am I doing this? See my webpage:
http://www.geog.ucsb.edu/~matzke/mad/home.html

...And if you want to st-borrow some (perhaps primitive, but
functional) IDL 5.4 scripts, check out the discussion page at my dept:

http://pinon.geog.ucsb.edu/cgi-bin/forumdisplay.cgi?action=t opics&forum=IDL,+ENVI,+other+RS+software&number=5&am p;DaysPrune=45&LastLogin=

(Do 'show all topics' to see some of the older stuff)

Thanks, Nick
[Message index]
 
Read Message
Read Message
Previous Topic: Re: changing contrast and brightness on the fly
Next Topic: IDL and UNIX setenv

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

Current Time: Fri Oct 10 05:17:21 PDT 2025

Total time taken to generate the page: 0.00677 seconds