testcoef.genv: Hypothesis test of the coefficients of the groupwise envelope...

View source: R/testcoef.genv.R

testcoef.genvR Documentation

Hypothesis test of the coefficients of the groupwise envelope model

Description

This function tests the null hypothesis L * beta * R = A versus the alternative hypothesis L * beta * R ~= A, where beta is estimated under the groupwise envelope model.

Usage

testcoef.genv(m, L, R, A)

Arguments

m

A list containing estimators and other statistics inherited from genv.

L

The matrix multiplied to beta on the left. It is a d1 by r matrix, while d1 is less than or equal to r.

R

The matrix multiplied to beta on the right. It is a p by d2 matrix, while d2 is less than or equal to p.

A

The matrix on the right hand side of the equation. It is a d1 by d2 matrix.

Note that inputs L, R and A must be matrices, if not, use as.matrix to convert them.

Details

This function tests for hypothesis H0: L beta[[i]] R = A, versus Ha: L beta[[i]] R != A. The beta is estimated by the groupwise envelope model. If L = Ir, R = Ip and A = 0, then the test is equivalent to the standard F test on if beta[[i]] = 0. The test statistic used is vec(L beta R - A) hatSigma^-1 vec(L beta R - A)^T, where beta is the envelope estimator and hatSigma is the estimated asymptotic covariance of vec(L beta R - A). The reference distribution is chi-squared distribution with degrees of freedom d1 * d2.

Value

The output is a list that contains following components.

chisqStatistic

The test statistic.

dof

The degrees of freedom of the reference chi-squared distribution.

pValue

p-value of the test.

covMatrix

The covariance matrix of vec(L beta R).

Examples

data(fiberpaper)
X <- fiberpaper[ , c(5, 7)]
Y <- fiberpaper[ , 1:3]
Z <- as.numeric(fiberpaper[ , 6] > mean(fiberpaper[ , 6]))
u <- u.genv(X, Y, Z)
u

m <- genv(X, Y, Z, 2)
m

L <- diag(3)
R <- diag(2)
A <- matrix(0, 3, 2)

test.res <- testcoef.genv(m, L, R, A)
test.res

Renvlp documentation built on Oct. 11, 2023, 1:06 a.m.

Related to testcoef.genv in Renvlp...