Skip to contents

This page examines a single-factor within-subjects (repeated measures) design using raw data input, focusing on omnibus and pairwise analyses.

Preliminary Tasks

Data Entry

This code inputs the variable names and creates a viewable data frame.

Outcome1 <- c(6, 8, 6, 8, 10, 8, 10, 9, 8, 7)
Outcome2 <- c(7, 13, 11, 10, 13, 8, 11, 14, 12, 11)
Outcome3 <- c(9, 16, 11, 12, 15, 13, 9, 14, 11, 10)
RepeatedData <- construct(Outcome1, Outcome2, Outcome3)

Summary Statistics

This code obtains the descriptive statistics for the data frame.

(RepeatedData) |> describeMoments()

Summary Statistics for the Data

               N       M      SD    Skew    Kurt
Outcome1  10.000   8.000   1.414   0.000  -0.738
Outcome2  10.000  11.000   2.211  -0.617  -0.212
Outcome3  10.000  12.000   2.449   0.340  -1.102

This code will display the correlations among the variables.

(RepeatedData) |> describeCorrelations()

Correlations for the Data

         Outcome1 Outcome2 Outcome3
Outcome1   1.000    0.533    0.385 
Outcome2   0.533    1.000    0.574 
Outcome3   0.385    0.574    1.000 

Analyses of the Omnibus Effect

The Analysis of Variance examines the overall differences among the means.

Source Table

Display the source table.

(RepeatedData) |> describeEffect()

Source Table for the Model

              SS      df      MS
Subjects  75.333   9.000   8.370
Measures  86.667   2.000  43.333
Error     40.667  18.000   2.259

Proportion of Variance Accounted for

Get an estimate of the proportion of variance account for by the factor (and the confidence interval for that estimate).

(RepeatedData) |> estimateEffect()

Proportion of Variance Accounted For by the Model

             Est      LL      UL
Measures   0.681   0.389   0.772

Significance Test

Test the overall differences for statistical significance.

(RepeatedData) |> testEffect()

Hypothesis Test for the Model

               F     df1     df2       p
Measures  19.180   2.000  18.000   0.000

Analyses of Pairwise Comparisons

The analyses for the pairwise comparisons do not assume homogeneity of variance and do not make adjustments for multiple comparisons (and are therefore effectively equivalent to a series of paired samples t tests).

Confidence Intervals

Obtain interval estimates for the pairwise comparisons.

(RepeatedData) |> estimatePairwise()

Confidence Intervals for the Pairwise Mean Differences

                       Diff      SE      df      LL      UL
Outcome1 v Outcome2   3.000   0.596   9.000   1.651   4.349
Outcome1 v Outcome3   4.000   0.730   9.000   2.348   5.652
Outcome2 v Outcome3   1.000   0.683   9.000  -0.545   2.545

Provide a traditional plot of the confidence intervals for the pairwise comparisons (including a line that represents no difference for the comparisons).

(RepeatedData) |> plotPairwise(line = 0, values = FALSE)

Provide a diffogram (plot of means and the confidence intervals for the pairwise comparisons).

(RepeatedData) |> plotPairwiseDiffogram()

Significance Tests

Test the pairwise comparisons for statistical significance.

(RepeatedData) |> testPairwise()

Hypothesis Tests for the Pairwise Mean Differences

                       Diff      SE      df       t       p
Outcome1 v Outcome2   3.000   0.596   9.000   5.031   0.001
Outcome1 v Outcome3   4.000   0.730   9.000   5.477   0.000
Outcome2 v Outcome3   1.000   0.683   9.000   1.464   0.177

Standardized Effect Sizes

Get the standardized effect sizes (and their confidence intervals) for the pairwise comparisons.

(RepeatedData) |> standardizePairwise()

Confidence Intervals for the Pairwise Standardized Mean Differences

                          d      SE      LL      UL
Outcome1 v Outcome2   1.616   0.466   0.703   2.530
Outcome1 v Outcome3   2.000   0.531   0.959   3.041
Outcome2 v Outcome3   0.429   0.333  -0.224   1.082

Analyses of Relational Intervals

Relational intervals are values (and boxes on a graph) that indicate whether two conditions are statistically significantly different. The analyses for the relational confidence intervals do assume homogeneity of variance but do not make adjustments for multiple comparisons.

Provide estimates of the arelational and relational intervals.

(RepeatedData) |> estimateRelational()

Confidence and Relational Intervals for the Means

               M   RI.LL   RI.UL   CI.LL   CI.UL
Outcome1   8.000   7.294   8.706   6.988   9.012
Outcome2  11.000  10.294  11.706   9.418  12.582
Outcome3  12.000  11.294  12.706  10.248  13.752

Plot the intervals.

(RepeatedData) |> plotRelational()

Analyses of Post Hoc Comparisons

The analyses for the post hoc comparisons do assume homogeneity of variance and do make adjustments for multiple comparisons (based on Tukey HSD procedures).

Confidence Intervals

Obtain interval estimates for the post hoc comparisons.

(RepeatedData) |> estimatePosthoc()

Confidence Intervals for the Posthoc Mean Differences

                       Diff      SE      df      LL      UL
Outcome1 v Outcome2   3.000   0.596   9.000   1.335   4.665
Outcome1 v Outcome3   4.000   0.730   9.000   1.961   6.039
Outcome2 v Outcome3   1.000   0.683   9.000  -0.907   2.907

Provide a traditional plot of the confidence intervals for the post hoc comparisons (including a line that represents no difference for the comparisons).

(RepeatedData) |> plotPosthoc(line = 0, values = FALSE)

Provide a diffogram (plot of means and the confidence intervals for the post hoc comparisons).

(RepeatedData) |> plotPosthocDiffogram()

Significance Tests

Test the post hoc comparisons for statistical significance.

(RepeatedData) |> testPosthoc()

Hypothesis Tests for the Posthoc Mean Differences

                       Diff      SE      df       t       p
Outcome1 v Outcome2   3.000   0.596   9.000   5.031   0.002
Outcome1 v Outcome3   4.000   0.730   9.000   5.477   0.001
Outcome2 v Outcome3   1.000   0.683   9.000   1.464   0.352

Standardized Effect Sizes

Get the standardized effect sizes (and their confidence intervals) for the post hoc comparisons.

(RepeatedData) |> standardizePosthoc()

Confidence Intervals for the Posthoc Standardized Mean Differences

                          d      SE      LL      UL
Outcome1 v Outcome2   1.616   0.466   0.703   2.530
Outcome1 v Outcome3   2.000   0.531   0.959   3.041
Outcome2 v Outcome3   0.429   0.333  -0.224   1.082