new series - Max function

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

quark2001
Posts: 4
Joined: Tue Sep 19, 2017 3:49 am

new series - Max function

Postby quark2001 » Wed Dec 20, 2017 7:01 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: new series - Max function

Postby EViews Gareth » Wed Dec 20, 2017 9:41 am

You can't take the log of zero.

@max finds the maximum of a series. You probably want @recode.
Follow us on Twitter @IHSEViews

quark2001
Posts: 4
Joined: Tue Sep 19, 2017 3:49 am

Re: new series - Max function

Postby quark2001 » Wed Dec 20, 2017 10:04 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: new series - Max function

Postby EViews Gareth » Wed Dec 20, 2017 11:09 am

Its not clear what you're trying to do.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 14 guests