Generating antilog in Eviews

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

xChris
Posts: 7
Joined: Sat Mar 24, 2018 2:48 pm

Generating antilog in Eviews

Postby xChris » Sun Mar 25, 2018 3:19 am

Hello, i am trying to generate an antilog function in Eviews (version 9) to compute the price of Z2, a variable with which i am going to conduct MWD test for my log-linear model. The problem is that the form of the equation suggested by the theory on this, is :equation: Z2 = antilog ln Yi (estimated) - Yi (estimated) and when i type this in "Genr" the following message comes up "ANTILOG is not defined". I know that there are other ways to choose the best regression model for my case but i still want to do the MWD because my professor asked for it.

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

Re: Generating antilog in Eviews

Postby EViews Gareth » Sun Mar 25, 2018 6:50 am

Exp
Follow us on Twitter @IHSEViews

xChris
Posts: 7
Joined: Sat Mar 24, 2018 2:48 pm

Re: Generating antilog in Eviews

Postby xChris » Sun Mar 25, 2018 7:35 am

Ok that is a quite short answer...could you maybe elaborate a little bit more? Considering that i am new in Eviews and i am still learning about this stuff.

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

Re: Generating antilog in Eviews

Postby EViews Gareth » Sun Mar 25, 2018 8:23 am

The antilog of the natural log is the exponential function, or exp
Follow us on Twitter @IHSEViews

xChris
Posts: 7
Joined: Sat Mar 24, 2018 2:48 pm

Re: Generating antilog in Eviews

Postby xChris » Sun Mar 25, 2018 9:26 am

Oh i see what you mean now. So to generate that, do i just have to type exp before my equation or something? Is this a possible command?

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

Re: Generating antilog in Eviews

Postby EViews Gareth » Sun Mar 25, 2018 10:00 am

It isn't clear what you're trying to do, so can't tell you how to do it.
Follow us on Twitter @IHSEViews

xChris
Posts: 7
Joined: Sat Mar 24, 2018 2:48 pm

Re: Generating antilog in Eviews

Postby xChris » Sun Mar 25, 2018 10:34 am

Well i have some data (time-series) which i am using to perform regressions and when i end up with the perfect regression model i am going to analyse what they show. I am convinced that log-lin is the one i should use but nevertheless i thought i would conduct as many tests as possible to check if my model is correctly specified and if i should change it.
The MWD test can show me which of these is better: the linear or the log-lin model. To do that the steps are as following from what i read: Create a variable with the estimated Y values for the linear model named Yi. Create a variable with the estimated Y values for the log-lin model named lnYi. Calculate a new variable named Z1i which is created from this equation: ln(Yi) - lnYi. Regress Y to the independent variables X and Z1i. If Z1i appears to be statistically important based on the t-test then reject null hypothesis (which in this case is that the correct model should be the linear one). Then calculate a new variable named Z2i which is created from this equation: antilog lnYi - Yi. Regress Y to the independent variables X and Z2i. Reject the hypothesis that log-lin model is the appropriate one, if Z2i appears to be statistically important based on the t-test.
These are exactly the instructions i have. And i can't do the antilog part. I hope it is more clear now.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Generating antilog in Eviews

Postby startz » Sun Mar 25, 2018 10:38 am

To create a new variable that is the antilog of q use

Code: Select all

series eq = exp(q)

xChris
Posts: 7
Joined: Sat Mar 24, 2018 2:48 pm

Re: Generating antilog in Eviews

Postby xChris » Sun Mar 25, 2018 1:22 pm

Nice, thanks i am gonna try that.
Well i did and although it worked the result is kinda bugging me... all the values of the new Z2 variable are zero...is this normal?
This is what i get:
https://imgur.com/PRXWc1o
When the values of my estimated Ys for both the linear and log-linear regressions are these:
https://imgur.com/w7uJ799
I am starting to wonder if i am doing something wrong.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Generating antilog in Eviews

Postby startz » Sun Mar 25, 2018 1:46 pm

The difference is a big negative number. The antilog of a big negative number is approximately zero. I suspect that you aren't computing one of the input variables the way you intend.

xChris
Posts: 7
Joined: Sat Mar 24, 2018 2:48 pm

Re: Generating antilog in Eviews

Postby xChris » Tue Mar 27, 2018 1:49 am

So what is that i am doing the wrong way here? I regress my dependent variable (expenditures on houses in the US from 1959 to 2003) to the independent variables (disposal personal income, house prices, interest in the US from 1959 to 2003, lag and a dummy for the years with crises), all the variables have been generated to their real values in the linear model and to their log values in the log-linear. That is pretty much it.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: Generating antilog in Eviews

Postby startz » Tue Mar 27, 2018 6:11 am

You are looking at logyfit - yfit. I doubt that's what you want as they have different scales.


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 4 guests