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

Home » Public Forums » archive » linear regression F-test
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
linear regression F-test [message #68340] Tue, 20 October 2009 06:44
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
Hi,

I'm struggling with the F-test after using REGRESS. The F-test goes as
follows:

H0: Y is linear independent from X's

Fcrit=F_CVF(alpha,nterm,npts-nterm-1) ; e.g. alpha=0.01
if (F >= Fcrit) then "H0 rejected"
else "Can't reject H0"

Or alternatively
alpha=1-F_PDF(F,nterm,npts-nterm-1)
if (alpha <= alphacrit) then "H0 rejected"
else "Can't reject H0"


I find that the F-test is passed often (i.e. H0 rejected) when Y
clearly doesn't depend on X in a linear way. In the code below I
illustrated my problem.

My question: is this normal and why?

Thanks,

Wout




pro test
npts=100
nterm=1

arg=findgen(npts)
X=fltarr(nterm,npts)
Y=exp(arg*0.1)+10*arg^3.

X[0,*]=arg

A = REGRESS( X, Y, yfit=yfit, ftest=F)
window
plot,arg,Y,psym=1
oplot,arg,yfit

;H0: Y is linear independent from X's
brejectH0=1b
alpha=1-F_PDF(F,nterm,npts-nterm-1) ;one-sided
print,(alpha le 0.01)?'At least one spectrum is linear associated with
the fitted spectrum':$
'No evidence of linear association with the spectrum'
print,'p-value',alpha
end;pro test
[Message index]
 
Read Message
Previous Topic: Re: importing .dll files
Next Topic: log plot

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

Current Time: Fri Oct 10 01:09:27 PDT 2025

Total time taken to generate the page: 0.96236 seconds