Hello, i'm using EViews 7.2.
I need help with a little program.
series test=na
!q=1
' for !q = 1 to 5 'loop for all 5 weekdays (deactivated)
for !i = 9 to 18 'loop limits hours
smpl @all if weekdy=!q and @hour >= !i and @hour <!i+1
test = @mean(rt*rt)
next
' next
This program does exactly what i would need, but i need it in half-hour steps and not hourly.
Could someone help me please?
Program and Data Files are attached!
Greetings, Nova
Problem with little program for Data Manipulation
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Problem with little program for Data Manipulation
- Attachments
-
- msci_europe_5m.wf1
- (433.37 KiB) Downloaded 160 times
-
- test1.prg
- (216 Bytes) Downloaded 204 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Problem with little program for Data Manipulation
Probably the easiest thing to do is to just add two case inside your loop. One for @minute<30 and one for @minute>=30.
Re: Problem with little program for Data Manipulation
Thank you Gareth!
I tried this before too, but i wasn't able to implement it right.
The problem still exists, because i don't really know how i should bring the @minute in the loop.
Maybe you could help me another time?
I know it may be really easy, but atm i'm not able to solve this little problem. :(
Greetings, Nova
I tried this before too, but i wasn't able to implement it right.
The problem still exists, because i don't really know how i should bring the @minute in the loop.
Maybe you could help me another time?
I know it may be really easy, but atm i'm not able to solve this little problem. :(
Greetings, Nova
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Problem with little program for Data Manipulation
Something like:
Code: Select all
series test=na
!q=1
' for !q = 1 to 5 'loop for all 5 weekdays (deactivated)
for !i = 9 to 18 'loop limits hours
smpl @all if weekdy=!q and @hour >= !i and @hour <!i+1 and @minute<30
test = @mean(rt*rt)
smpl @all if weekdy=!q and @hour >= !i and @hour <!i+1 and @minute>=30
test = @mean(rt*rt)
next
' next
Who is online
Users browsing this forum: No registered users and 1 guest
