Two-Way ANOVA Process

Two-Way ANOVA Process

1. Case Analysis

Currently, data on the weight loss effect of 39 volunteers has been collected. Their lifestyles can be divided into 3 types. Now researchers want to study the impact of lifestyle and gender on weight loss, and want to know about different lifestyles and genders. Whether there is a significant difference between the weight loss effects, some of the data collected are as follows:

The "lifestyle" and "gender" in the research are both qualitative data, and "weight loss" is quantitative data. If you want to study the differences in weight loss effects under different lifestyles and different genders, you can use two-factor analysis of variance.

2. Preconditions

Two-factor ANOVA is used to study the relationship between two categorical data and quantitative data, but there are three prerequisites for using two-factor ANOVA. The analyzed data needs to meet independence, normality and variance homogeneity. Next, it is necessary to test one by one to determine whether the two-factor analysis of variance can be used for research.

(1) Independence

Since the weight loss process among the 39 volunteers was independent and did not interfere with each other, the independence test passed.

(2) Normality

There are many methods of normality test, common methods include statistical test method, graphical method (histogram, PP graph, QQ graph), etc. Among them, the statistical test method is the most strict, so this analysis uses this method for normality test.

First, the normality test was carried out on the weight loss effects of different groups, and the results of the SPSSAU normality test were as follows:

SPSSAU normality test provides three types of normality test results: Kolmogorov-Smirnov test, Shapiro-Wilk test and Jarque-Bera test. Because the sample size of this analysis was small (<50), the results of the Shapiro-Wilk test were used for judgment. It can be seen from the above table that the p values ​​corresponding to different groups are all greater than 0.05, indicating that the data has normal characteristics and passed the normality test. If the sample size is large, the other two methods can be used for testing.

The results of the normality test for different genders are as follows:

From the analysis results in the above table, it can be seen that the weight loss effect of different genders also passed the normality test. In summary, the data in this case passed the normality test. Next, a homogeneity of variance test is performed.

(3) Equal variance

The homogeneity of variance test can be analyzed using the homogeneity of variance in SPSSAU analysis of variance. The variance homogeneous analysis SPSSAU operation of weight loss effect of different lifestyles is as follows:

The output of SPSSAU is as follows:

Use the homogeneous variance test to analyze whether there is a significant difference in the data fluctuation of the weight loss effect under different lifestyles. It can be seen from the above table that the weight loss effect under different lifestyles will not show a significant difference (p >0.05), that is The volatility of sample data of different lifestyles showed consistency, and there was no difference, and the data passed the homogeneity of variance test.

As above, the homogeneous variance test was carried out on the weight loss effect of samples of different genders, and the results were as follows:

It can be seen from the above table that the volatility of sample data of different genders also showed consistency, and the data passed the homogeneity of variance test. In summary, the data in this case passed the homogeneity of variance test.

In summary, the case data meet the three preconditions of the two-factor ANOVA, and the two-factor ANOVA can be performed.

3. Two-way ANOVA

In the process of two-way ANOVA, the main effect and interaction effect can be analyzed separately. The main effect refers to the difference in the influence of the independent variable X on the dependent variable Y; the interaction effect refers to the difference in the influence of the interaction item X1*X2 of X1 and X2 on Y.

(1) Main effect analysis

When performing the main effect analysis of a certain factor, it is to exclude the interference of all factors other than the analysis item. For example, in this case, the main effect is to judge the influence of "lifestyle" and "gender" on weight loss respectively.

The results of SPSSAU two-way analysis of variance are as follows:

It can be seen from the above table that the lifestyle is significant (p<0.05), indicating that the main effect exists, that is, different lifestyles have different effects on weight loss. Gender did not show significance (p=0.735>0.05), indicating that gender does not have a main effect, that is, different genders do not have differential effects on weight loss. We next looked at whether the interaction term of lifestyle and gender would have a new differential effect on weight loss.

(2) Analysis of interaction effects

The interaction effect is to study whether the collocation of different independent variables will have a new impact on the dependent variable. For example, in this example, check the impact of "lifestyle * gender" on weight loss. If you want to view the interaction effect, you need to check [Second-order effect] (also called interaction effect) during analysis, as shown in the figure below:

The output interaction effect analysis results of SPSSAU are as follows:

It can be seen from the above table that the interaction item "lifestyle * gender" does not show significance (p=0.656>0.05), indicating that there is no interaction effect.

In summary, in this analysis, lifestyle will have a significant difference in weight loss, gender will not have a significant difference in weight loss, and there is no interaction effect. Next for further analysis.

4. In-depth analysis

For two-way ANOVA, simple effects analysis can be further performed if interaction effects exist. The simple effect refers to the comparison of differences between different levels of the independent variable X2 when the independent variable X1 is at a certain level. When the main effect exists, post hoc multiple comparisons can be performed. Post-hoc multiple comparison refers to the comparison of differences between pairs of independent variables X with main effects at different levels.

(1) Simple effect

In this case, the interaction effect does not exist, so the simple effect analysis is generally not performed. For the purpose of explanation, use the analysis results to explain the simple effect analysis. In this case, simple effect analysis is illustrated such as: when lifestyle is 1, the difference in weight loss between different sexes is studied; or when sex is 1, the difference in weight loss between lifestyles 1 and 2 .

When the interaction effect exists, perform simple effect analysis, and check [Simple Effect] during analysis, as shown in the figure below:

At this time, SPSSAU will output the simple effect analysis results, as shown below:

If the interaction effect exists, then you can check the p value corresponding to the simple effect analysis to see the difference in weight loss under the specific lifestyle and gender combination. Since the interaction effect does not exist in this example, it will not be described further. Post-hoc multiple comparisons were then performed.

(2) Post-hoc multiple comparisons

In this example, the main effect of lifestyle exists, and post-hoc multiple comparisons can be performed to compare the differences in weight loss between pairs of different lifestyles. There are many methods of post hoc multiple comparisons, common ones are LSD method, Scheffe method, Tukey method, Bonferroni correction method, etc., because LSD method is the most widely used and has high test efficiency, so this case uses this method for post hoc multiple comparisons. SPSSAU operates as follows:

The output of SPSSAU is as follows:

It can be seen from the above table that there is a significant difference between lifestyle 1 and lifestyle 2 (p=0.001<0.05) after multiple comparisons of lifestyles; there is a significant difference between lifestyle 1 and lifestyle 3 (p=0.035<0.05); and there was no significant difference between lifestyle 2 and lifestyle 3 (p=0.181>0.05). Specifically comparing the mean difference, it can be seen that the mean value of Lifestyle 2 is the largest, which means that Lifestyle 2 has the best weight loss effect.

Since the main effect of gender did not exist, post hoc multiple comparisons were not performed.

V. Summary

Two-factor analysis of variance was used to study whether there were differences in the impact of different lifestyles and genders on weight loss; the study found that lifestyle had a significant impact on weight loss, but gender had no significant impact on weight loss, and both lifestyle and gender Interaction effects do not exist. Using post-hoc multiple comparisons to deeply analyze the differences between different lifestyles, the study found that lifestyle 2 has the best weight loss effect. So if you want to get a better weight loss effect, you can lose weight according to lifestyle 2.

Guess you like

Origin blog.csdn.net/m0_37228052/article/details/129821919