1. Home
2. SSPM directive

# SSPM directive

Declares one or more SSPM data structures.

### Options

`TERMS` = formula Terms for which sums of squares and products are to be calculated; default `*` Maximum number of vectors in a term; default 3 Full factor parameterization (`yes, no`); default `no` Groups for within-group SSPMs; default `*` Number of degrees of freedom for sums of squares; default `*`

### Parameters

`IDENTIFIER` = identifiers Identifiers of the SSPMs Symmetric matrix to contain the sums of squares and products for each SSPM Variate to contain the means for each SSPM Number of units or sum of weights for each SSPM Pointers to variates of group means for each SSPM

### Description

The SSPM structure stores a matrix of corrected sums of squares and products, and associated information, as used for regression and some multivariate analyses. You can form values for SSPM structures by the `FSSPM` directive. However, most multivariate and regression analyses can be done without declaring and forming an SSPM explicitly.

An SSPM comprises four structures (identified by their suffixes). Their labels can be specified in either upper or lower case, or any mixture.

`` or `['Sums']` is a symmetric matrix containing the sums of squares and products. The number of rows and columns of this matrix will equal the number of parameters defined by the expanded terms list: that is, the number of variates plus the number of dummy variates generated by the model formula. (See the `TERMS` directive.)

`` or `['Means']` is a variate containing the mean for each variate or dummy variate.

`` or `['Nunits']` is a scalar holding the total number of units used in constructing the sums of squares and products matrix. If the SSPM is weighted, this scalar will hold the sum of the weights.

A within-group SSPM has one additional element:

`` or `['Wmeans']` is a pointer, pointing to variates holding within-group means. There is one variate for each row of the `'Sums'` matrix plus one extra. They are all of the same length, namely the number of levels of the `GROUPS` factor. The extra variate holds counts of the number of units in each group.

The `TERMS` option of the `SSPM` directive defines the model for whose components the sums of squares and products are to be calculated. In the simplest case the model is just a list of variates, but you can use more complex model formulae, involving variates and factors; this is done in conjunction with the `FACTORIAL` and `FULL` options.

You can form a within-group matrix of sums of squares and products by specifying the relevant factor with the `GROUPS` option.

Sometimes you may already have calculated values for the matrix of sums of squares and products. You can then assign them to the component structures of the SSPM for example by `READ`. You would still, however, need to set the number of degrees of freedom associated with the matrix, and for that you use the `DF` option.

The parameter lists let you specify identifiers for the four components of an SSPM. You can have declared them previously (and you can have given them values), but if so they must be of the correct type.

Options: `TERMS`, `FACTORIAL`, `FULL`, `GROUPS`, `DF`.

Parameters: `IDENTIFIER`, `SSP`, `MEANS`, `NUNITS`, `WMEANS`.

Directives: `FSSPM`, `CVA`, `FCA`, `PCO`, `PCP`, `TERMS`, `FORMULA`, `SCALAR`, `SYMMETRICMATRIX`, `VARIATE`.

Procedures: `FCORRELATION`, `FVCOVARIANCE`, `ROBSSPM`.

Commands for: Data structures, Multivariate and cluster analysis.

### Example

```" Example SSPM-1: declaring an SSPM structure"