Generating antilog in Eviews
Moderators: EViews Gareth, EViews Moderator
Generating antilog in Eviews
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 loglinear model. The problem is that the form of the equation suggested by the theory on this, is 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.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11731
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Generating antilog in Eviews
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.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11731
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Generating antilog in Eviews
The antilog of the natural log is the exponential function, or exp
Follow us on Twitter @IHSEViews
Re: Generating antilog in Eviews
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?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11731
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Generating antilog in Eviews
It isn't clear what you're trying to do, so can't tell you how to do it.
Follow us on Twitter @IHSEViews
Re: Generating antilog in Eviews
Well i have some data (timeseries) 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 loglin 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 loglin 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 loglin 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 ttest 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 loglin model is the appropriate one, if Z2i appears to be statistically important based on the ttest.
These are exactly the instructions i have. And i can't do the antilog part. I hope it is more clear now.
The MWD test can show me which of these is better: the linear or the loglin 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 loglin 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 ttest 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 loglin model is the appropriate one, if Z2i appears to be statistically important based on the ttest.
These are exactly the instructions i have. And i can't do the antilog part. I hope it is more clear now.

 Nonnormality and collinearity are NOT problems!
 Posts: 3299
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Generating antilog in Eviews
To create a new variable that is the antilog of q use
Code: Select all
series eq = exp(q)
Re: Generating antilog in Eviews
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 loglinear regressions are these:
https://imgur.com/w7uJ799
I am starting to wonder if i am doing something wrong.
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 loglinear regressions are these:
https://imgur.com/w7uJ799
I am starting to wonder if i am doing something wrong.

 Nonnormality and collinearity are NOT problems!
 Posts: 3299
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Generating antilog in Eviews
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.
Re: Generating antilog in Eviews
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 loglinear. That is pretty much it.

 Nonnormality and collinearity are NOT problems!
 Posts: 3299
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Generating antilog in Eviews
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: Google [Bot] and 2 guests