Page 1 of 1

Assignment !v=@var(d(x)) gives error msg

Posted: Thu Nov 05, 2015 8:08 am
by mamo
Hi,
Using Eviews 9
I am wondering why assignments such as

Code: Select all

!v = @var(dlog(x)) !v = @var(d(x))
in a program, or, in the command line,

Code: Select all

scalar v = @var(dlog(x))
don't work.
I obtain an error message like
DLOG is an illegal or reserved name in "!VAR = @VAR(DLOG(X))".
Same applies to other stat. functions such as @cov, @mean, etc.

Of course, lines like

Code: Select all

!v = @var(log(x)) !v = @var(@sqrt(x))
do work.

So, why does

Code: Select all

!v = @var(dlog(x))
not do the job?

Best,
mamo

Re: Assignment !v=@var(d(x)) gives error msg

Posted: Thu Nov 05, 2015 8:50 am
by EViews Gareth
Functions that are used to assign to a scalar only, in general, understand expressions involving functions that work on scalars or vector/matrix objects, not series.

The log function works on both series and vectors/matrices/scalars. The dlog function only works on series.

Re: Assignment !v=@var(d(x)) gives error msg

Posted: Fri Nov 06, 2015 6:16 am
by mamo
Hi,

thanks for your reply.

I would like to suggest to change that in future versions of EVIEWS so that assignments such as "scalar x = @var(d(y))" or "!x=@var(d(y))" are feasable, I would find this feature elementary for an advanced (and, by the way, not so cheap) econometric analysis package.

I know that there are work-arounds possible to cope with the current design but I do not find this very convenient.

More generally, given that y denotes a series, it is difficult to understand the logic behind why "scalar x= @var(y)" works but not so "scalar x=@var(d(y))" as conceptually, d(y) is just another series. In fact, statistical functions such as @var(), @mean(), etc, should plausibly be assumed to work on series, and therefore also on functions which provide series.

More specifically, the treatment of functions which assign to a scalar only and what they understand and what not does not seem to be treated consistently, and this distinction is also not obvious to the user.

Thus, "scalar z = @var(@nan(x,1))" works, even though the function @nan() assigns to a series only - it is of course welcome that it does work this way.
Secondly, @mean seems to assign to a scalar since the following works: "scalar z = @mean(x)".
However, the following does not work: "scalar z = @mean(@mean(z))"

Looking across different contexts, commands like "line @var(dlog(x))" or "show @var(dlog(x))" are feasable and yield the expected output, even though dlog assigns to a series - this is welcome, of course. It would be even better, though, if also "scalar x = @var(dlog(y))" were possible.

Best,
mamo