Forms a projection matrix for a set of model terms (R.W. Payne).

### No options

### Parameters

`TERMS` = formula structures |
Defines the model terms corresponding to the design matrices whose projection matrices are required |
---|---|

`PROJECTION` = symmetric matrices |
Saves the projection matrix for each formula structure |

### Description

This procedure forms the projection matrix for the design matrix of a set of model terms. The terms are specified in a model formula using the `TERMS`

parameter, and the projection matrix is saved (as a symmetric matrix) by the `PROJECTION`

parameter.

Options: none.

Parameters: `TERMS`

, `PROJECTION`

.

### Method

The projection matrix is

`X *+ GINVERSE( TRANSPOSE(X) *+ X ) *+ TRANSPOSE(X)`

The design matrix `X`

is formed using the `TERMS`

directive, and the generalized inverse is formed using the `GINVERSE`

procedure.

### Action with `RESTRICT`

The factors must not be restricted, nor may they contain missing values.

### See also

Procedures: `ASWEEP`

, `FRTPRODUCTDESIGNMATRIX`

.

Commands for: Analysis of variance, Calculations and manipulation.

### Example

CAPTION 'FPROJECTIONMATRIX example'; STYLE=meta FACTOR [NVALUES=9; LEVELS=3] A,B GENERATE A,B FPROJECTION !f(A),!f(A+B),!f(A*B); PROJECTION=PA,PAplusB,PAstarB PRINT [SERIAL=yes] PA,PAplusB,PAstarB; FIELD=8