I have a table in my program that displays a number of series. These series only get created if certain conditions are met. So I'm wondering if , when those conditions are not met, and the series is not created, can i somehow still have the table show up with an NA rather than the message I currently get which says "series is not defined."
Hope this makes sense, and thanks.
Tables that contain series that sometimes aren't populated
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Tables that contain series that sometimes aren't populated
One option--might or might not meet your needs--is to create the series and set them equal to NA. Then your code can populate them with real values or just leave them alone.
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Tables that contain series that sometimes aren't populated
Thanks, That would create a second problem though because another formula is dependent on how many series get populated.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13312
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Tables that contain series that sometimes aren't populated
Tables are entirely under your control. If you want to set an element of a table equal to NA, then do it.
In other words, I am not really sure what the issue is.
In other words, I am not really sure what the issue is.
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Tables that contain series that sometimes aren't populated
The issue is I would rather not have to comment out and uncomment lines of tables all the time. I would like the table code to stay as it is whether all series are populated or only some are populated.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13312
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Tables that contain series that sometimes aren't populated
The EViews programming language supports if statements. You can have your code do things or not do things based upon conditions. If there are lines of code that you don't want to occur if a condition is not met, use an if condition.
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Tables that contain series that sometimes aren't populated
Right, this is what I had in mind but I'm not sure how to code an if statement for whether a series exists.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13312
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Tables that contain series that sometimes aren't populated
Code: Select all
if @isobject("seriesname") then
else
endif
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Who is online
Users browsing this forum: No registered users and 5 guests