Hello everyone,
I am trying to make a loop for different samples using the code I wrote below:
for %samle = s1 s2 s3 s4 all
smpl %sample
freeze(tab1_{%sample}) gr_d1_core.stats
tab1_{%sample}(4,1) = "Statistics/Variable"
next
However, Eviews told me that there were an error. Does anyone know how to fix this? Thank you very much.
Loop for samples
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Loop for samples
Code: Select all
for %samle s1 s2 s3 s4 @all
smpl {%sample}
freeze(tab1_{%sample}) gr_d1_core.stats
tab1_{%sample}(4,1) = "Statistics/Variable"
next
-
banhbengconuong
- Posts: 15
- Joined: Mon Apr 25, 2011 8:31 pm
Re: Loop for samples
Many thanks, I have done it, but because eviews doesn't allow to put @ in the name of object, so I defined the sample all before doing the loop.
Code: Select all
for %samle s1 s2 s3 s4 @all smpl {%sample} freeze(tab1_{%sample}) gr_d1_core.stats tab1_{%sample}(4,1) = "Statistics/Variable" next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Loop for samples
ah, of course.
Who is online
Users browsing this forum: No registered users and 2 guests
