Download presentation

Presentation is loading. Please wait.

Published byAlaina Wilcox Modified over 2 years ago

1

2
Xuhua Xia Data Transformation Objectives: –Understand why we often need to transform our data –The three commonly used data transformation techniques –Additive effects and multiplicative effects –Application of data transformation in ANOVA and regression.

3
Xuhua Xia Why Data Transformation? The assumptions of most parametric methods: –Homoscedasticity –Normality –Additivity –Linearity Data transformation is used to make your data conform to the assumptions of the statistical methods Illustrative examples

4
Xuhua Xia Homoscedasticity and Normality The data deviates from both homoscedasticity and normality.

5
Xuhua Xia Homoscedasticity and Normality Won’t it be nice if we would make data look this way?

6
Xuhua Xia Types of Data Transformation The logarithmic transformation The square-root transformation The arcsine transformation. Data transformation can be done conveniently in EXCEL. Alternatives: Ranks and nonparametric methods.

7
Xuhua Xia Homoscedasticity The two groups of data seem to differ greatly in means, but a t-test shows that the means do not differ significantly from each other - a surprising result. The two groups of data differ greatly in variance, and both deviate significantly from normality. These results invalidate the t-test. We calculate two ratios: var/mean ratio and Std/mean ratio (i.e., coefficient of variation). Group1Group2 Var/mean C.V Log-transformation

8
Xuhua Xia The transformation is successful because: –The variance is now similar –Deviation from normality is now nonsignificant –The t-test revealed a highly significant difference in means between the two groups Log-Transformed Data NewX = ln(X+1)

9
Xuhua Xia Log-Transformed Data NewX = ln(X+1) Transform back: Compare this mean with the original mean. Which one is more preferable? Calculate the standard error, the degree of freedom, and 95% CL (t 0.025,16 = 2.47).

10
Xuhua Xia Normal but Heteroscedastic Any transformation that you use is likely to change normality. Fortunately, t-test and ANOVA are quite robust for this kind of data. Of course, you can also use nonparametric tests.

11
Xuhua Xia Normal but Heteroscedastic The two variances are significantly different. The t-test, however, detects significant difference in means. You can use nonparametric methods to analyse data for comparison, and you are like to find t-test to be more powerful.

12
Xuhua Xia Additivity What experimental design is this? Compare the group means. Is there an interaction effect? Additivity means that the difference between levels of one factor is consistent for different levels of another factor.

13
Xuhua Xia Multiplicative Effects Compare the group means. Is there an interaction effect? Does this data set meet the assumption of additivity? When the assumption of additivity is not met, we have difficulty in interpreting main effects. Now calculate the ratio of group means. What did you find?

14
Xuhua Xia Multiplicative Effects For Factor A, we see that Level 2 has a mean about 2.88 times as large as that for Level 1. For factor B, Level 2 has a mean about 2.18 times as large as that for Level 1). If you know the value for Level 1 of Factor A, you can obtain the value for Level 2 of Factor A by multiplying the known value by Similarly, you can do the same for Factor B. We say that the effect of Factors A and B are multiplicative, not additive.

15
Xuhua Xia Log-transformation Now log-transform the data. Compare the means. Is the assumption of additivity met now? Original Data Transformed data Mean Variance

16
Xuhua Xia Why log-transformation can change the multiplicative effects to additive effects?

17
Xuhua Xia Square-Root Transformation The two groups of data differ much in variance. Calculate two ratios: var/mean ratio and Std/mean ratio (i.e., coefficient of variation). Does your calculation suggest log- transformation? When is log- transformation appropriate? Use square-root transformation when different groups have similar Variance/Mean ratios Notice the means, which do not coincide with the most frequent observations

18
Xuhua Xia Square-Root Transformation Square-root transformation: The variance is now almost identical between the two groups Transform the means back to the original scale and compare these means with the original means:

19
Xuhua Xia Quiz on Data Transformation The data set is right- skewed for each group. Calculate the variance/mean ratio and C.V. for each group, and decide what transformation you should use. Do the transformation and convert the means back to the original scale.

20
Xuhua Xia With Multiple Groups When you have multiple groups, a “Variance vs Mean” or a “Std vs Mean” plot can help you to decide which data transformation to use. The graph on the left shows that the Var/Mean ratio is almost constant. What transformation should you use?

21
Xuhua Xia Confidence Limits Before transformationAfter transformation With the skewness in our data, do confidence limits on the right make more sense? Why?

22
Xuhua Xia Arcsine Transformation Used for proportions Compare the variances before and after transformation Do you know how to transform the means and C.L. back to the original scale?

23
Xuhua Xia Data Transformation Using SAS Data Mydata; input x; newx=log(x); newx=sqrt(x+3/8); newx=arsin(sqrt(x)); cards; Natural logarithm transfromation Square-root transformation Arcsine transformation

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google