Question: [Multiple-Sample Testing of Variance Matrix] Problem 14.8 Problem 14.8 Using base matrix tools of R, create a function which returns the value of Roy's test
[Multiple-Sample Testing of Variance Matrix] Problem 14.8
![[Multiple-Sample Testing of Variance Matrix] Problem 14.8 Problem 14.8 Using base matrix](https://s3.amazonaws.com/si.experts.images/answers/2024/07/668945f1cc2d1_369668945f1ba100.jpg)


Problem 14.8 Using base matrix tools of R, create a function which returns the value of Roy's test statistic given in Equation 14.21. It is beyond the scope of the current work to clearly underpin the statistical motivation of Roy '5- test. An elegant description of the Roy's test can be found in Section 6.1.4 of Rencher (2002). We now give a watered-down version of Roy's test. Let 1, denote the largest eigenvalue of the matrix E 'H. The Roy's largest root test is given by 0 = 1 + M (14.21) The test procedure is then to reject the hypothesis H if 0 > a,s.my, where s = min{UH, p), m = (10H - P| - 1), N = (VE - P - 1). For the rootstock dataset, the one-line R code below gives the result based on the Roy's test. > summary (root . manova, test = "Roy") Df Roy approx F num Df den Df Pr (> F) rs 5 1. 88 15 .8 5 42 1e-08 * * * Residuals 42 Signif. codes: 0 ' ***' 0.001 ' * *' 0.01 ' *' 0.05 ' .' 0.1 ' ' 1 The Roy's test also rejects the hypothesis H that the mean vector for the six strata are equal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
