Page 1 of 1

How to store autocorrelations

Posted: Wed Mar 25, 2009 12:53 pm
by cap
Hello,

I know that for a given series, I can view the ACF by doing var1.correl, but how can I actually record or access each of the individual autocorrelation values?

I was thinking that in a for loop, something like

myseries = var1.correl(10)

or

myvec(!i) = var1.correl(!i)

would work, but it would seem they do not...


Thanks in advance,
-cap

Re: How to store autocorrelations

Posted: Wed Mar 25, 2009 1:31 pm
by EViews Gareth
Try:

Code: Select all

vector(10) myvec for !i=1 to 10 myvec(!i) = @cor(var1,var1(-!i)) next

This will get you almost identical results to the correl view. The difference is because the correl view uses an approximation to the individual correlations, whereas the code above uses exact calculations.