Hey guys,
I have monthly data from January 1981 till December 2016 (the format is "yyyy[M]MM"). Im running the following two for loops in order to analyze each point in time:
for !year = 1981 to 2016
for !month = 1 to 12
smpl !yearM!month !yearM!month if...(several conditions regarding the variables)
next
next
Is there a possibility to replace the two loops with one? For example, something like this:
for !date = 1981M1 to 2016M12 step 1
smpl !date !date if....
next
Thank you in advance!
Replacing for loops
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Replacing for loops
You're better off using the @otod and @dtoo functions to convert into observation space rather than dealing with dates.
Who is online
Users browsing this forum: No registered users and 1 guest
