'Box-Cox Transformation in SPSS

I transformed my stat data with logarithm, square root,... but my dependent variable doesn't achieve normality distribution yet.

Then, I know that the Box-Cox transformation permit us to find out the best transformation approach in order to achieve normality distribution and therefore apply parametric test such as ANOVA.

Can anybody help me in how I can perform this Box-Cox transformation in SPSS software? It is possible to apply through its syntax?



Solution 1:[1]

There is a Box Cox transformation syntax on Raynald's SPSS tools website. The data are just to give an example.

I added some simple syntax to easily see the results.

* Box-Cox transformation for all 31 values of lambda between -2 to 1
(increments of .1).
* Raynald Levesque 2003/11/08.
* http://www.spsstools.net/en/syntax/syntax-index/compute/box-cox-transformation/

GET FILE="C:\{SPSS user folder}\Employee data.sav".
COMPUTE var1=salary./* salary is a skewed test variable.

VECTOR lam(31) /xl(31).
LOOP idx=1 TO 31.
COMPUTE lam(idx)=-2.1 + idx * .1.
DO IF lam(idx)=0.
COMPUTE xl(idx)=LN(var1).
ELSE.
COMPUTE xl(idx)=(var1**lam(idx) - 1)/lam(idx).
END IF.
END LOOP.

* visual examination of results.
EXAMINE
VARIABLES= salary  xl1 to xl31
/PLOT=NPPLOT
/stat descrip.

* numerical examination of results.
FREQUENCIES
/VARIABLES= salary, xl1 to xl31
/FORMAT= NOTABLE
/STATISTICS=SKEWNESS KURTOSIS.

The numerical examination works best after having copied the results in a spreadsheet.

Solution 2:[2]

This worked for me: "Go to Transform – Prepare Data for Modelling Automatic from the drop down list. In the Fields tab you can specify which variables to transform by moving them to the Inputs box. In the Settings tab click on Rescale Fields. Tick the box before ‘Rescale a continuous target with a Box-Cox transformation to reduce skew’. Click Run. This will create a new column with the transformed variable."

From: https://www.researchgate.net/post/How_can_I_do_Box-Cox_transformations_in_SPSS You might want to double check with another source.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ROMANIA_engineer
Solution 2 bribina