Page 1 of 1

Finding max and min of scalar objects

Posted: Wed Oct 29, 2014 8:51 am
by gmcatee
Is there an EViews function that will find the max/min/etc of a set of scalar values? The @max command is only valid for series objects. I can think of roundabout ways to do this (copy all scalars to a series and then use @max or use a bunch of indicator functions) but I wanted to know if this feature was already available.

Also, a general question -- if I can't find a function, is there a way I can program my own function, such as @maxnum(scalar1, scalar2, ...), and then call that from the command window or within any command file I write? Not by using a subroutine or creating a separate .prg file but embed it inside of my copy of EViews?

Here is an example of how I intend to use this:

Code: Select all

!scalar1 = 10 ' a scalar object determined previously in the code !scalar2 = 20 ' a scalar object determined previously in the code for !i = @maxnum(5,!scalar1) to @minnum(15,!scalar2) ...
Thanks

Re: Finding max and min of scalar objects

Posted: Wed Oct 29, 2014 9:19 am
by EViews Gareth
There isn't that function.

You cannot create your own functions (outside of add-ins, of course).

I'd recommend putting them into a vector rather than a series.

Re: Finding max and min of scalar objects

Posted: Mon Nov 03, 2014 9:37 am
by gmcatee
Great, thanks for your help Gareth