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
How to store autocorrelations
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to store autocorrelations
Try:
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.
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.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 31 guests