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

Home » Public Forums » archive » Re: Regression fit and random noise
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: Regression fit and random noise [message #83690 is a reply to message #83689] Thu, 28 March 2013 14:51 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Not quite sure what you're asking here - we need a little more info. What routine are you using to do the fit? When you say noise/signal ratio, do you mean signal to noise ratio (SNR)? Do you have some sort of example data?

Regardless, consider the following "simple" linear regression, adapted from the IDL help:

PRO test_model

npts = 100
x = FINDGEN(npts)

noiseFactor = 0.

y = x + noiseFactor*(RANDOMU(seed, npts)-0.5)

plot, x, y, psym=2

result = REGRESS(X, Y, SIGMA=sigma, CONST=const, corr = r2, $
MEASURE_ERRORS=measure_errors)

PRINT, 'Constant: ', const
PRINT, 'Coefficients: ', result[*]
PRINT, 'Standard errors: ', sigma
PRINT, 'Correl Coeff: ', r2

END

Notice as you increase the noise factor, the correlation coefficient gets worse. This is entirely expected and is not a IDL-only thing. Basically, the "signal" gets swamped out by the "noise". You should get your hands on a good statistics book (e.g., Data Reduction and Error Analysis in the Physical Sciences by Bevington, Statistical Methods in the Atmospheric Sciences by Wilks) to better interpet what's going on "under the hood". For instance, according to regress.pro, the fit is done via chi squared minimization.

Good luck!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Simplify if statements and for loops inside for loops
Next Topic: Re: Calculating difference between each element in array from previous

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

Current Time: Sat Oct 11 08:58:05 PDT 2025

Total time taken to generate the page: 1.19457 seconds