4.6 Repeated measures ANOVA

In this experiment, we have more than one measure per unit of observation, namely willingness to spend for conspicuous products and willingness to spend for inconspicuous products. A repeated measures ANOVA can be used to test whether the effects of the experimental conditions are different for conspicuous versus inconspicuous products.

To carry out a repeated measures ANOVA, we need to restructure our data frame from wide to long. A wide data frame has one row per unit of observation (in our experiment: one row per participant) and one column per observation (in our experiment: one column for the conspicuous products and one column for the inconspicuous products). A long data frame has one row per observation (in our experiment: two rows per participant, one row for the conspicuous product and one row for the inconspicuous product) and an extra column that denotes which type of observation we are dealing with (conspicuous or inconspicuous). Let’s convert the data frame and then see how wide and long data frames differ from each other.

## # A tibble: 286 x 5
##    subject power audience consumption_type   wtp
##    <fct>   <fct> <fct>    <chr>            <dbl>
##  1 1       high  public   cc                 5  
##  2 1       high  public   icc                2.6
##  3 2       low   public   cc                 7.6
##  4 2       low   public   icc                4  
##  5 3       low   public   cc                 5.4
##  6 3       low   public   icc                3.4
##  7 4       low   public   cc                 8.4
##  8 4       low   public   icc                5.2
##  9 5       high  public   cc                 7.8
## 10 5       high  public   icc                3  
## # ... with 276 more rows

We have two rows per subject, one column for willingness to pay and another column (consumption_type) denoting whether it’s willingness to pay for conspicuous or inconspicuous products. Compare this with the wide dataset:

## # A tibble: 143 x 5
##    subject power audience    cc   icc
##    <fct>   <fct> <fct>    <dbl> <dbl>
##  1 1       high  public     5     2.6
##  2 2       low   public     7.6   4  
##  3 3       low   public     5.4   3.4
##  4 4       low   public     8.4   5.2
##  5 5       high  public     7.8   3  
##  6 6       high  public     7.2   5  
##  7 7       low   public     4.8   4  
##  8 8       high  public     6.6   4.4
##  9 9       low   public     5.8   4.2
## 10 10      high  public     6.8   3.4
## # ... with 133 more rows

We have one row per subject and two columns, one for each type of product.

We can now carry out a repeated measure ANOVA. For this we need the ez package.

We want to test whether the interaction between power and audience is different for conspicuous and for inconspicuous products. Let’s take a look at a graph first:

## `summarise()` regrouping output by 'power', 'audience' (override with `.groups` argument)

We can now formally test the three-way interaction:

## $ANOVA
##                            Effect DFn DFd            F            p p<.05
## 2                           power   1 139 1.867530e+00 1.739647e-01      
## 3                        audience   1 139 2.977018e+00 8.667716e-02      
## 5                consumption_type   1 139 6.303234e+02 1.687352e-53     *
## 4                  power:audience   1 139 5.801046e-03 9.393977e-01      
## 6          power:consumption_type   1 139 4.719313e-01 4.932445e-01      
## 7       audience:consumption_type   1 139 2.700684e-02 8.697041e-01      
## 8 power:audience:consumption_type   1 139 2.982598e+00 8.638552e-02      
##            ges
## 2 9.061619e-03
## 3 1.436772e-02
## 5 5.915501e-01
## 4 2.840440e-05
## 6 1.083172e-03
## 7 6.204919e-05
## 8 6.806406e-03

We see in these results that the three-way interaction between power, audience, and consumption type is marginally significant. You can report this as follows: "A repeated measures ANOVA established that the three-way interaction between power, audience, and consumption type, was marginally significant (F(1, 139) = 2.98, p = 0.086).