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

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

mamo
Posts: 192
Joined: Wed Nov 07, 2012 9:11 am

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

Postby mamo » Thu Nov 05, 2015 8:08 am

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

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

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

Postby EViews Gareth » Thu Nov 05, 2015 8:50 am

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.
Follow us on Twitter @IHSEViews

mamo
Posts: 192
Joined: Wed Nov 07, 2012 9:11 am

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

Postby mamo » Fri Nov 06, 2015 6:16 am

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


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 43 guests