HYPOTH_PARTIAL Function
Constructs an equivalent completely testable multivariate general linear hypothesis HβU = G from a partially testable hypothesis HpβU = Gp.
Usage
result = HYPOTH_PARTIAL(info_v, hp)
Input Parameters
info_v—One-dimensional array of type BYTE containing information about the regression fit. See function MULTIREGRESS.
hp—The Hp array of size nhp by n_coefficients with each row corresponding to a row in the hypothesis and containing the constants that specify a linear combination of the regression coefficients. Here, n_coefficients is the number of coefficients in the fitted regression model.
Returned Value
result—Number of rows in the completely testable hypothesis, nh. This value is also the degrees of freedom for the hypothesis. The value nh classifies the hypothesis HpβU = Gp as nontestable (nh = 0), partially testable (0 < nh < Rank_Hp) or completely testable (0 < nh = Rank_Hp), where Rank_Hp is the rank of Hp (see keyword Rank_Hp).
Input Keywords
Double—If present and nonzero, double precision is used.
Gp—Two-dimensional array of size nhp by nu containing the Gp matrix, the null hypothesis values. By default, each value of Gp is equal to 0.
Output Keywords
Rank_Hp—Named variable into which the rank of Hp is stored.
H_Matrix—Named variable into which a two-dimensional array of size nh by n_parameters containing the H matrix is stored. Each row of H_Matrix corresponds to a row in the completely testable hypothesis and contains the constants that specify an estimable linear combination of the regression coefficients.
G_Matrix—Named variable into which a one-dimensional array of length nu containing the G matrix is stored. The elements of G_Matrix contain the null hypothesis values for the completely testable hypothesis.
Discussion
Once a general linear model y = Xβ + ε is fitted, particular hypothesis tests are frequently of interest. If the matrix of regressors X is not full rank (as evidenced by the fact that some diagonal elements of the R matrix output from the fit are equal to zero), methods that use the results of the fitted model to compute the hypothesis sum of squares (see HYPOTH_SCPH Function) require specification in the hypothesis of only linear combinations of the regression parameters that are estimable. A linear combination of regression parameters cTβ is estimable if there exists some vector a such that cT = aTX, i.e., cT is in the space spanned by the rows of X. For a further discussion of estimable functions, see Maindonald (1984, pp. 1661168) and Searle (1971, pp. 1802188). Function HYPOTH_PARTIAL is only useful in the case of non-full rank regression models, i.e., when the problem of estimability arises.
Peixoto (1986) noted that the customary definition of testable hypothesis in the context of a general linear hypothesis test Hβ = g is overly restrictive. He extended the notion of a testable hypothesis (a hypothesis composed of estimable functions of the regression parameters) to include partially testable and completely testable hypothesis. A hypothesis Hβ = g is partially testable if the intersection of the row space H (denoted by ) and the row space of X () is not essentially empty and is a proper subset of , i.e., . A hypothesis Hβ = g is completely testable if . Peixoto also demonstrated a method for converting a partially testable hypothesis to one that is completely testable so that the usual method for obtaining sums of squares for the hypothesis from the results of the fitted model can be used. The method replaces Hp in the partially testable hypothesis Hpβ = gp by a matrix H whose rows are a basis for the intersection of the row space of Hp and the row space of X. A corresponding conversion of the null hypothesis values from gp to g is also made. A sum of squares for the completely testable hypothesis can then be computed (see function HYPOTH_SCPH). The sum of squares that is computed for the hypothesis Hβ = g equals the difference in the error sums of squares from two fitted models—the restricted model with the partially testable hypothesis Hpβ = gp and the unrestricted model.
For the general case of the multivariate model Y = Xβ + ε with possible linear equality restrictions on the regression parameters, HYPOTH_PARTIAL converts the partially testable hypothesis Hpβ = gp to a completely testable hypothesis HβU = G. For the case of the linear model with linear equality restrictions, the definitions of the estimable functions, nontestable hypothesis, partially testable hypothesis, and completely testable hypothesis are similar to those previously given for the unrestricted model with the exception that is replaced by where R is the upper triangular matrix based on the linear equality restrictions. The nonzero rows of R form a basis for the rowspace of the matrix (XT, AT)T. The rows of H form an orthonormal basis for the intersection of two subspaces—the subspace spanned by the rows of Hp and the subspace spanned by the rows of R. The algorithm used for computing the intersection of these two subspaces is based on an algorithm for computing angles between linear subspaces due to Bjšrk and Golub (1973). (See also Golub and Van Loan 1983, pp. 429430). The method is closely related to a canonical correlation analysis discussed by Kennedy and Gentle (1980, pp. 561565). The algorithm is as follows:
1. Compute a QR factorization of:
with column permutations so that
Here, P1 is the associated permutation matrix that is also an orthogonal matrix. Determine the rank of Hp as the number of nonzero diagonal elements of R1, for example n1. Partition Q1 = (Q11, Q12) so that Q11 is the first n1 column of Q1. Set Rank_Hp = n.
2. Compute a QR factorization of the transpose of the R matrix (input through info_v) with column permutations so that:
Determine the rank of R from the number of nonzero diagonal elements of R, for example n2. Partition Q2 = (Q21, Q22) so that Q21 is the first n2 columns of Q2.
3. Form:
4. Compute the singular values of A:
and the left singular vectors W of the singular value decomposition of A so that:
If σ1 < 1, then the dimension of the intersection of the two subspaces is
s = 0. Otherwise, assume the dimension of the intersection to be s if σs = 1 > σs+1. Set nh = s.
5. Let W1 be the first s columns of W. Set H = (Q1W1)T.
6. Assume R11 to be a nhp by nhp matrix related to R1 as follows: If nhp < n_parameters, R11 equals the first nhp rows of R1. Otherwise, R11 contains R1 in its first n_parameters rows and zeros in the remaining rows. Compute a solution Z to the linear system:
If this linear system is declared inconsistent, an error message with error code equal to 2 is issued.
7. Partition:
so that Z1 is the first n1 rows of Z. Set:
The degrees of freedom (nh) classify the hypothesis HpβU =Gp as nontestable (nh = 0), partially testable (0 < nh < Rank_Hp), or completely testable (0 < nh = Rank_Hp).
For further details concerning the algorithm, see Sallas and Lionti (1988).
Example
A one-way analysis-of-variance model discussed by Peixoto (1986) is fitted to data. The model is:
yii = μ + αi + εii..(i, j) = (1, 1) (2, 1) (2, 2)
The model is fitted using the MULTIREGRESS Function. The partially testable hypothesis:
is converted to a completely testable hypothesis.
nrows  =  3
n_indep  =  1
n_dep  =  1
n_param  =  3
n_class  =  1
n_cont  =  0
nhp  =  2
z  =  [1, 2, 2]
y  =  [17.3, 24.1, 26.3]
gp  =  [5, 3]
hp  =  TRANSPOSE([[0, 1, 0], [0, 0, 1]])
x  =  REGRESSORS(z, n_class, n_cont)
size_x  =  SIZE(x)
nreg  =  size_x(2)
coefs  =  MULTIREGRESS(x, y, Predict_Info = info_v)
; % MULTIREGRESS: Warning: STAT_RANK_DEFICIENT
; The model is not full rank.  There is not a unique least 
; squares solution. The rank of the matrix of regressors is 2.
nh  =  HYPOTH_PARTIAL(info_v,  hp, Gp  =  gp, $
   G_Matrix = g_matrix, H_Matrix = h_matrix, Rank_Hp = rank_hp)
IF (nh EQ 0) THEN PRINT, 'Nontestable Hypothesis' $
   ELSE IF (nh LT rank_hp) THEN $
      PRINT,  'Partially Testable Hypothesis' $
   ELSE PRINT, 'Completely Testable Hypothesis'
; PV-WAVE prints: Partially Testable Hypothesis
PM,  h_matrix,  title  =  'H Matrix'
; PV-WAVE prints the following:
; H Matrix
;      0.00000     0.707107    -0.707107
PM,  g_matrix,  title  =  'G'
; PV-WAVE prints the following:
; G
;       1.41421
Warning Errors
STAT_HYP_NOT_CONSISTENT—The hypothesis is inconsistent within the computed tolerance.