Hello,
I have the following problem. I have more than 45 series and I would like to program the following:
For %y 1-45 '(I don't know if that's possible)
IF nameseries_{%y}>=0.50 then
'count observations before founding >=0.50 condition and put it on a scalar.
else
'nothing
next
So, I don't know how to program it, but I hope you could understand what I am trying to do.
Thank you!!!!
Looping with IF function
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: Looping with IF function
Unfortunately not.I hope you could understand what I am trying to do.
-
rmoralesaramburu
- Posts: 52
- Joined: Mon Nov 18, 2013 9:09 am
Re: Looping with IF function
Thanks, I figure it out with this:
Code: Select all
matrix(47,1) months_to_hike
for !i = 1 to 47
smpl if fwd2013_!i<=0.5
matrix months_to_hike(!i,1)=@obs( fwd2013_!i)
nextWho is online
Users browsing this forum: No registered users and 1 guest
