I have a panel in which contains only NAs for some cross sections. I need to run individual estimations for each cross section. Obviously, if one cross sections only contains NAs, I end up with an error message (insufficient observations)
To avoid this problem I use want to use an if condition, i.e. if series<>NA then do stuff. However, I receive an error: "NA found in matrix if series<>NA then"
Any suggestions?
NA in series
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: NA in series
If statements cannot be used with raw series.
Use:
Of course you probably don't want 0 as the test. You'll need more than that.
Use:
Code: Select all
if series.@obs > 0 then
'estimate
endif
Of course you probably don't want 0 as the test. You'll need more than that.
Follow us on Twitter @IHSEViews
Re: NA in series
series.@obs has exactly the same value for every observation.
-
- EViews Developer
- Posts: 563
- Joined: Thu Apr 25, 2013 7:48 pm
Re: NA in series
I believe EViews Gareth meant "@obs(series)" rather than "series.@obs". The function @obs respects the current sample, which I assume you're setting as you iterate through your cross sections.
Re: NA in series
I still haven't figured out a way to exclude a cross section if there are too many NAs in this cross section.
Who is online
Users browsing this forum: No registered users and 17 guests