I am using EViews 7.
I wish to compare the results for Linear and NonLinear Equations (the latter having different dependent variables due to the use of logs).
I've been told I need to do a 'BoxCox' transformation of my data but can only find one reference to BoxCox transformations in the User Manual (in Data Graphing).
How then do I apply a BoxCox transformation to my data in EViews so that I can get comparable rsquareds etc.
Thanks
John
How do I do a BoxCox Transformation?
Moderators: EViews Gareth, EViews Steve, EViews Jason, EViews Moderator, EViews Pamela

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11765
 Joined: Tue Sep 16, 2008 5:38 pm
Re: How do I do a BoxCox Transformation?
Code: Select all
series y_boxcox = (y^a1)/a
Where Y is the series you're transforming, and a is the BoxCox parameter.
Follow us on Twitter @IHSEViews

 EViews Developer
 Posts: 2590
 Joined: Wed Oct 15, 2008 9:17 am
Re: How do I do a BoxCox 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^a1)/a)

 Posts: 7
 Joined: Wed Jun 21, 2017 3:33 pm
Re: How do I do a BoxCox Transformation?
Hello,
It's possible to estimate the best value of lamda BoxCox 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 BoxCox 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

 BoxCox_step 2 & 3.png (53.33 KiB) Viewed 1942 times

 BoxCox_step 1.png (50.12 KiB) Viewed 1942 times
Who is online
Users browsing this forum: No registered users and 4 guests