2022년 11월 12일 토요일

ch.7 2-way ANOVA

 easier R than SPSS with Rcmdr : Contents

 

ch.7 2-way ANOVA


In 2-way ANOVA, two factors apply to an individual. If you do a study of 2 drugs and 3 exercise programs, an individual is given one drug and one exercise program (i.e. an individual is given 2 causes, which is 2-way), and is divided into a total of 6 groups.

A similar situation is true when 2 drugs are applied in three doses. (You might judge this case a little differently, but let’s assume it’s the same case for beginners. )

 

 Selecting one for the Factor area results in 1-way ANOVA and selecting two results in 2-way ANOVA. ‘Include interaction~’ means that there may be interactions between two variables, so review them.

 

It will automatically create a matching picture. It also expresses the mean and standard deviation.

   

These graphs, which we saw earlier, show similar information and are all suitable for 2-way ANOVA.

 

The statistical results are represented by the ‘Anova Table’. Since the 3 values of interest – dose, supp and dose: supp (interaction) – are all less than 0.05, we can determine that they have statistical significance.

 


 

Let’s also do 2-way ANAVA in the ‘Original menu’.

 

However, ‘dose’ is a numeric variable and cannot be considered a factor.

 

 So let’s change it to a factor variable. This is a very common occurrence.

You can code it anew, or you can just choose it as a factor with a numeric shape. The new variable name is ‘dose2’.

 

Now that you have the fatcorized variable ‘dose2’, you can specify two factors by specifying it as factor.

 

The results are cleaned up in an ANOVA table. Note that it is named ‘dose2’.

The Anova table I saw earlier had (intercept) and the format was a little different, but in the end it’s the same thing.

 

It also displays the mean and standard deviation of each group.

 

Looking back at the command we had previously enforced, we can see that this was using data called TempDF.


 

This used to create temporary data TempDF, and used to make dose and supp factor automatically.

In other words, some commands are convenient to perform because they make a numeric variable a factor and temporarily create and analyze the data. Also, as needed, in some cases the user needs to work with a numeric variable to factor.

 

By creating commands to perform these tasks in batches, you can perform multiple tasks at once. You might think that the scripting method might be more convenient than clicking on a menu in some cases.

 


easier R than SPSS with Rcmdr : Contents

=================================================

  • R data visualization book 2
https://tinyurl.com/R-plot-II-2  simple variables
https://tinyurl.com/R-plot-II-3-4   many variables / map
https://tinyurl.com/R-plot-II-5-6   time related / statistics related
https://tinyurl.com/R-plot-II-7-8   others / reactive chart 
 

 

댓글 없음:

댓글 쓰기