Performs tests of the null hypothesis H0 : \(\beta^*\) = 0, where \(\beta^*\) is a block submatrix of \(\beta\) as in Section 7.2.
bothsidesmodel.hotelling(x, y, z, rows, cols)
An \(N \times P\) design matrix.
The \(N \times Q\) matrix of observations.
A \(Q \times L\) design matrix
The vector of rows to be tested.
The vector of columns to be tested.
A list with the following components:
A list with the components of the Lawley-Hotelling \(T^2\) test (7.22)
A list with the components of the Wilks \(\Lambda\) test (7.37)
# Finds the Hotelling values for example 7.3.1
data(mouths)
x <- cbind(1, mouths[, 5])
y <- mouths[, 1:4]
z <- cbind(c(1, 1, 1, 1), c(-3, -1, 1, 3), c(1, -1, -1, 1), c(-1, 3, -3, 1))
bothsidesmodel.hotelling(x, y, z, 1:2, 3:4)
#> $Hotelling
#> $Hotelling$T2
#> [1] 2.903177
#>
#> $Hotelling$F
#> [1] 0.6967626
#>
#> $Hotelling$df
#> [1] 4 24
#>
#> $Hotelling$pvalue
#> [1] 0.6016391
#>
#>
#> $Wilks
#> $Wilks$Lambda
#> [1] 0.8959089
#>
#> $Wilks$Chisq
#> [1] 2.692955
#>
#> $Wilks$df
#> [1] 4
#>
#> $Wilks$pvalue
#> [1] 0.610448
#>
#>