I am using E-Views 7.
I wish to compare the results for Linear and Non-Linear Equations (the latter having different dependent variables due to the use of logs).
I've been told I need to do a 'Box-Cox' transformation of my data but can only find one reference to Box-Cox transformations in the User Manual (in Data Graphing).
How then do I apply a Box-Cox transformation to my data in E-Views so that I can get comparable r-squareds etc.
Thanks
John
How do I do a Box-Cox Transformation?
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13305
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How do I do a Box-Cox Transformation?
Code: Select all
series y_boxcox = (y^a-1)/a
Where Y is the series you're transforming, and a is the Box-Cox parameter.
Follow us on Twitter @IHSEViews
-
- EViews Developer
- Posts: 2671
- Joined: Wed Oct 15, 2008 9:17 am
Re: How do I do a Box-Cox Transformation?
...and of course
if a=0 (Gareth only handles the difficult cases )
If you are not sure whether a is zero at the onset of the command and don't want to have to test and then switch between the two formulations, you could use @recode.
Code: Select all
series y=log(y)
if a=0 (Gareth only handles the difficult cases )
If you are not sure whether a is zero at the onset of the command and don't want to have to test and then switch between the two formulations, you could use @recode.
Code: Select all
series y_boxcox=@recode(a=0, log(y), (y^a-1)/a)
-
- Posts: 7
- Joined: Wed Jun 21, 2017 3:33 pm
Re: How do I do a Box-Cox Transformation?
Hello,
It's possible to estimate the best value of lamda Box-Cox transformation with "use Spitzer(1982) algorithm diriving from L(lamda)".
First, compute the geometric mean of Y(t), with Y(t)<>0.
Second, scale Yt by its geometric mean:
third, the “trick” simplifies L(λ) considerably. Ignoring constant terms, L(lamda)...
my question is: How can estimate the best lamda value with Spitzer(1982) algorithm or via simple program, honestly i have a difficulty to interpret the third step by LogL.
Could someone help me.
Best Cherif.
It's possible to estimate the best value of lamda Box-Cox transformation with "use Spitzer(1982) algorithm diriving from L(lamda)".
First, compute the geometric mean of Y(t), with Y(t)<>0.
Code: Select all
series gm=@gmean(Y)
Second, scale Yt by its geometric mean:
Code: Select all
series z=y/gm
third, the “trick” simplifies L(λ) considerably. Ignoring constant terms, L(lamda)...
my question is: How can estimate the best lamda value with Spitzer(1982) algorithm or via simple program, honestly i have a difficulty to interpret the third step by LogL.
Could someone help me.
Best Cherif.
- Attachments
-
- Box-Cox_step 2 & 3.png (53.33 KiB) Viewed 9358 times
-
- Box-Cox_step 1.png (50.12 KiB) Viewed 9358 times
Who is online
Users browsing this forum: No registered users and 11 guests