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

Home » Public Forums » archive » Re: autocorrelation with Missing Values
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: autocorrelation with Missing Values [message #60871 is a reply to message #60867] Wed, 18 June 2008 04:19 Go to previous message
matthias.demuzere is currently offline  matthias.demuzere
Messages: 32
Registered: January 2006
Member
On Jun 18, 10:26 am, maffie <matthias.demuz...@geo.kuleuven.be> wrote:
> Hi,
>
> I would like to perform an autocorrelation with a few missing values
> in the array (I used 'Nan' and blank spaces as missing values). Now,
> If I try the routine a_correlate, the calculated effective degrees of
> freedom results in Nan, and so is also my new correlation coefficient.
>
> Does anybody know how I can solve this?
>
> Thank you!
> Matthias

Oh, and maybe providing the code could be more understanding:

n_Pres_01=n_elements(spec)
lag=1
aauto_Pres_01=a_correlate(spec,lag,/DOUBLE)
bauto_Pres_01=a_correlate(Pres,lag,/DOUBLE)
neff_Pres_01=(n_Pres_01*1.0)/(1.0+(2.0*(aauto_Pres_01*bauto_ Pres_01)))

; calcculate student's t & calculate significance
t_Pres_01=abs(R_Pres_01*sqrt((neff_Pres_01-2.0)/(1.0-
(R_Pres_01^2.0))))
sig_Pres_01=(1-(t_pdf(t_Pres_01,(neff_Pres_01-2.0))))*100.0
if sig_Pres_01 gt 50.0 then sig_Pres_01=(100.0-sig_Pres_01(0))

; need to double as two-tailed test
sig_Pres_01=sig_Pres_01*2.0

Hope that somebody can help me out!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: ASCII TEMPLATE (read the 31 column of ascii file only)
Next Topic: Re: ASCII TEMPLATE (read the 31 column of ascii file only)

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

Current Time: Fri Oct 10 14:47:41 PDT 2025

Total time taken to generate the page: 0.64019 seconds