| 17.4.2.4 Algorithms (Repeated Measures ANOVA)RMANOVA-Algorithm 
 One-way/Two-way Repeated MeasuresFor the details of the algorithms for the one-way and two way balanced repeated measure design, please see Repeated Measures ANOVA.pdf
 Two-way Mixed-DesignMultivariate TestsConsidering the model: Two-Way Mixed Design RM ANOVA with one between subject factor A and another within subject factor B.
 Let /math-8ce4b16b22b58894aa86c421e8759df3.png?v=0) be the number of levels for factor A, /math-83878c91171338902e0fe0fb97a8c47a.png?v=0) be the number of levels for factor B, /math-584a81dbf5bf6aa737ba43567ad6307b.png?v=0) be the number of subjects with ith level of factor A, /math-09614e75034336faafa6e5823ad3ac4c.png?v=0) be observations with respect to jth subject and ith level of factor A. Define Error matrix as:
/math-c2a24e957187868f7a5f66aea335e309.png?v=0) and Hypothesis matrix as: /math-5c05e9d7e58f8f010d395cbd393b7720.png?v=0) and Hypothesis matrix with intercept as: /math-e268b25cdd6f0588e185ac750ec02fff.png?v=0)  where
 /math-6ed86e6cc990b9d1af993d4c0927715f.png?v=0) and /math-eb5752fb3802a9a7960258fdf838eb2d.png?v=0) 
 And the degree of freedom can be obtained by /math-fb02db9e63440cd2e05d80f42d461504.png?v=0) and /math-74801925a7dfba9046ad170e97859025.png?v=0) , respectively. Suppose the mean vectors of factor A's levels are /math-3de7e1b2c368a355b1e2304c7eea22a0.png?v=0) , and we let /math-bdd78b6a720ed92a3892028772a4577f.png?v=0)  Main effect of within factor BLet the contrast matrix be
 /math-b8927dc7ffec56da7d89517bdf88c99f.png?v=0) 
 In order to test /math-182b16b132638a9d5f73df5455c7e79f.png?v=0) , we can compute the values of Wilks' Lambda, Hotelling-Lawley Trace, Pillai's Trace and Roy's Largest Root. The SS&CPs are: /math-0a7eeb38a8d6559fc2d585c56ef2a178.png?v=0) 
 Notes: All sum of squares are calculated based on type III.
 Interaction effect of B*AThe null hypothesis is /math-d5a9ebbbdd2249c50f21c02d80b0ee99.png?v=0) The SS&CPs are: /math-8740d5daf3633ac0aa8055fd00c487c7.png?v=0) 
 Mauchly's Test of SphericityLet design matrix be 
 /math-511b707f131edaf39ee2a6a958a35e85.png?v=0) 
 The residual matrix is obtained by /math-1e08c5818b30602c926a294072259b93.png?v=0)  Let /math-69691c7bdcc3ce6d5d8a1361f22d04ac.png?v=0) be the /math-e3ceee9ec583c7faf39dd069ddeb4f3f.png?v=0) orthogonal matrix which can be set like /math-10621239e770e8df473420e90d18816d.png?v=0) 
 Let /math-d25d17d844562411064a9f23b26a6175.png?v=0)  Let /math-c36f976ce9ed7b7cff6af4cb5ff5c753.png?v=0) Here /math-9861855a82345bcd4eaa0d3e47cf6ea0.png?v=0)  Then Mauchly's W Statistic is 
 /math-dfa34554beee8930d717da684a7aa28c.png?v=0) 
 The Chi-square test value is /math-6d1c809f7dfe136ca756ba72be767636.png?v=0) with freedom degree /math-a767a173a88aa034d131ec4b1c4678b2.png?v=0)  /math-6cb8aa6f3d4995e2a9949f4118384329.png?v=0) 
 /math-2308f07b4e36581d5399e8e055c3adc7.png?v=0) 
 /math-e04e1cc8d5e7de346b48a15ada4e180e.png?v=0) 
 Within and Between TestSome basic calculations:
 /math-d77c0dc584970f5ddf3f8c76ddddfb58.png?v=0) with degree freedom /math-d8e1c07214fd6285d4206fb683352c15.png?v=0) 
  Sum Square of Between Factor A:
 /math-5ce6c446b06d95d1235b2bab6c3d0ee1.png?v=0) with degree freedom /math-b54b9bba2b59c6585a5b50cc1ace25ae.png?v=0) 
  Sum Square of Within Factor B:
 /math-3d7f70012333abcbb9b3f0a197c08b7d.png?v=0) with degree freedom /math-3066706bcb6ae6279cbd20354905ccb5.png?v=0) 
 Where
 /math-e38f8fe6d7ffb147886aed2f6b95877d.png?v=0) 
 Tests of Within-Subjects Effects Sum Square of factor B for Within test
 /math-a0399b25e8a990662496b013d6e78c4e.png?v=0) with degree freedom /math-c0e52469ec501fd48c935d53a33e1831.png?v=0) 
  Sum Square of interaction A*B for Within test 
 /math-1076b0939d92ec5d378d55d9831cf350.png?v=0) with degree freedom /math-4dbf7d16253ce4aedf3d5a1ceb25d1b3.png?v=0) 
  Sum Square of error(factor B) for Within test 
 /math-11007c96d117ab07ad0e07c096256209.png?v=0) with degree freedom /math-af69b65318cb407302efc4b495c4d44c.png?v=0) 
 Tests of Between-Subjects Effects Sum Square of intercept for Between test
 /math-6443281de8e5073438892356febe1f0a.png?v=0) with degree freedom /math-607e0e920ccf75242a73abeb509266d0.png?v=0) 
  Sum Square of intercept for Between test(when set intercept = 0)
 /math-ad771ad1001b53a2e0ba9067e8b72e41.png?v=0) with degree freedom /math-607e0e920ccf75242a73abeb509266d0.png?v=0) Here /math-8933fce11a2d04e1400e749b44dce205.png?v=0) is the design matrix associated to effect A, while /math-57cec4137b614c87cb4e24a3d003a3e0.png?v=0) is a /math-e4d2a34ee9561bb27bcfa53efe63c16b.png?v=0) matrix representing the indexed data.
  Sum Square of between factor A for Between test
 /math-2a9c76b5d2ca68bfaefe2782cc3d588b.png?v=0) with degree freedom /math-607e0e920ccf75242a73abeb509266d0.png?v=0) 
  Sum Square of error(factor A) for Between test
 /math-ba0afaef0639b15f981b9c5920d0a2e7.png?v=0) with degree freedom /math-ce7d8d33214b606d9702fb021bb9470a.png?v=0) 
 Multiple Means ComparisonsThere are various methods for multiple means comparison in Origin, and we use the ocstat_dlsm_mean_comparison() function to perform means comparisons. 
 Two types of multiple means comparison methods: 
 Single-step method. It creates simultaneous confidence intervals to show how the means differ, including Tukey-Kramer, Bonferroni, Dunn-Sidak, Fisher’s LSD and Scheffé mothods.
 Stepwise method. Sequentially perform the hypothesis tests, including Holm-Bonferroni and Holm-Sidak tests
 |