Forms summation, or relationship, matrices for model terms (C.J. Brien).
||Model terms corresponding to design matrices whose summation matrices are required|
||Saves the summation or relationship matrix for each term|
This procedure forms the summation, or relationship, matrix for the design matrix of a model term. This is similar to the projection matrix, constructed by the
FPROJECTIONMATRIX calculates the mean of the units of a data variate with each effect of the term, and then forms a new data variate where each unit contains the mean calculated for the relevant effect.
FRTPRODUCTDESIGNMATRIX calculates the sums of the data values instead of the means. The result is also a relationship matrix that indicates, using one and zero whether two units have the same levels of the factors in a term. One use for these matrices in synthesizing a variance matrix that involves a linear combination of variance components.
The term is specified (as a model formula) using the
TERM parameter, and the matrix is saved (as a symmetric matrix) by the
The summation or relationship matrix is
D *+ TRANSPOSE(D)
The design matrix
D is formed using the
The factors must not be restricted, nor may they contain missing values.
CAPTION 'FRTPRODUCTDESIGNMATRIX example'; STYLE=meta FACTOR [NVALUES=15; LEVELS=5] Blocks & [LEVELS=3] Plots GENERATE Blocks,Plots FRTPRODUCTDESIGNMATRIX TERM=!f(Blocks),!f(Blocks.Plots); MATRIX=S_B,S_BP PRINT [SERIAL=yes] S_B,S_BP; FIELDWIDTH=4; DECIMALS=1 CALCULATE Variance = 20 * S_B + 5 * S_BP PRINT Variance; FIELDWIDTH=4; DECIMALS=0