Hi,
I have a series within a model which have some negative values, creating problems in an equation specified in logs. I would like to declare to take the max(series,0) for all the elements in the series, shall I create a new one? Or can I do it in the equation?
Example:
equation eq_AAA.ls log(AA) c log(@max(series,0))
That syntax gives an error. How is the best way to do it?
Thanks
new series - Max function
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13309
- Joined: Tue Sep 16, 2008 5:38 pm
Re: new series - Max function
You can't take the log of zero.
@max finds the maximum of a series. You probably want @recode.
@max finds the maximum of a series. You probably want @recode.
Follow us on Twitter @IHSEViews
Re: new series - Max function
EViews Gareth wrote:You can't take the log of zero.
@max finds the maximum of a series. You probably want @recode.
Of course sorry, I meant something like max(log(series),0)
But if the series is negative, log is not defined and max would not work, I guess. How should I do it with recode?
Thanks
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13309
- Joined: Tue Sep 16, 2008 5:38 pm
Re: new series - Max function
Its not clear what you're trying to do.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 9 guests