restrSigmaGPCM computes constrained covariance matrices for the 14 GPCM specifications

This routine applies the constraints to the covariance matrices using the specifications contained in input structure pa.

`SigmaB`

— initial unconstrained covariance matrices.
p-by-p-by-k array.p-by-p-by-k array containing the k covariance matrices for the k groups.

**
Data Types: **`single|double`

`niini`

— sizes of the groups.
Vector.Row vector of length k containing the size of the groups.

**
Data Types: **`single|double`

`pa`

— Constraints to apply and model specification.
Structure.Structure containing the following fields:

Value | Description |
---|---|

`pars` |
type of Gaussian Parsimonious Clustering Model. Character. A 3 letter word in the set: 'VVE','EVE','VVV','EVV','VEE','EEE','VEV','EEV','VVI', 'EVI','VEI','EEI','VII','EII' |

`cdet` |
scalar in the interval [1 Inf) which specifies the the restriction which has to be applied to the determinants. If pa.cdet=1 all determinants are forced to be equal. See section More About for additional details. |

`shw` |
scalar in the interval [1 Inf) which specifies the the restriction which has to be applied to the elements of the shape matrices inside each group. If pa.shw=1 all diagonal elements of the shape matrix of cluster j (with j=1, ..., k) will be equal. |

`shb` |
scalar in the interval [1 Inf) which specifies the the restriction which has to be applied to the elements of the shape matrices across each group. |

`maxiterS` |
positive integer which specifies the maximum number of iterations to obtain the restricted shape matrix. This parameter is used by routine restrshapepars. The default value of pa.maxiterS is 5. |

`maxiterR` |
positive integer which specifies the maximum number of iterations to obtain the common rotation matrix in presence of varying shape. This parameter is used by routine cpcV. The default value of pa.maxiterR is 20. |

`maxiterDSR` |
positive integer which specifies the maximum number of iterations to obtain the requested restricted determinants, shape matrices and rotation. For all parametrizations pa.maxiterDSR is set to 1 apart from for the specifications 'VVE', 'EVE' and 'VEE'. The default value of pa.maxiterDSR is 20. |

`tol` |
tolerance to use to exit the iterative procedures. Scalar. The iterative procedures stops when the relative difference of a certain output matrix is smaller than itertol in two consecutive iterations. The default value of pa.tol is 1e-12. |

`zerotol` |
tolerance value to declare all input values equal to 0 in the eigenvalues restriction routine (file restreigen.m) or in the final reconstruction of covariance matrices. The default value of zerotol is 1e-10. |

`k` |
the number of groups. |

`p` |
the number of variables. |

**
Data Types: **`struct`

`Sigma`

—constrained covariance matrices.
p-by-p-by-k arrayp-by-p-by-k array containing the k covariance matrices for the k groups. See section 'More About' for the notation for the eigen-decomposition of the component covariance matrices.

`lmd`

—restricted determinants.
` `

VectorRow vector of length $k$ containing restricted determinants.

More precisely, the $j$-th element of lmd contains $\lambda_j^{1/p}$. The elements of lmd satisfy the constraint pa.cdet in the sense that $\max(lmd) / \min(lmd) \leq pa.cdet^{(1/p)}$. In other words, the ratio between the largest and the smallest determinant is not greater than pa.cdet. All the elements of vector lmd are equal if modeltype is E** or if pa.cdet=1.

`OMG`

—constrained rotation matrices.
p-by-p-by-k arrayp-by-p-by-k array containing the k rotation matrices for the k groups. If common rotation is imposed (third letter is equal to E), OMG(:,:,1)=...=OMG(:,:,k).

`GAM`

—constrained shape matrix.
2D arrayMatrix of size p-by-k containing in column j the elements on the main diagonal of shape matrix $\Gamma_j$. The elements of GAM satisfy the following constraints:

The product of the elements of each column is equal to 1.

The ratio among the largest elements of each column is not greater than pa.shb.

The ratio among the second largest elements of each column is not greater than pa.shb.

....

The ratio among the smallest elements of each column is not greater than pa.shb.

The ratio of the elements of each column is not greater than pa.shw.

The notation for the eigen-decomposition of the component covariance matrices is as follows \[ \Sigma_j= \lambda_j^{1/p} \Omega_j \Gamma_j \Omega_j' \qquad j=1, 2, \ldots, k \]

The dimension of matrices $\Omega_j$ and $\Lambda_j$ is $p\times p$.

$c_{det}=$ scalar, constraint associated with the determinants.

$c_{shw}=$ scalar, constraint inside each group of the shape matrix.

$c_{shb}=$ scalar, constraint among groups of the shape matrix.

Note that if you impose equal volumes $c_{det}=1$. Similarly, if you impose a spherical shape $c_{shw}=1$.

We also denote with

[

[

[

After the application of this routine, the product of the elements of each column of matrix GAM is equal to 1.

The ratio of the elements of each row is not greater than $c_{shb}$ (pa.shb).

The ratio of the elements of each column is not greater than $c_{shw}$ (pa.shb). All the columns of matrix GAM are equal if the second letter of modeltype is E. All the columns of matrix GAM are equal to 1 if the second letter of modeltype is I.

[

[

The elements of lmd satisfy the constraint pa.cdet in the sense that $\max(lmd) / \min(lmd) \leq pa.cdet^{(1/p)}$. In other words, the ratio between the largest and the smallest determinant is not greater than pa.cdet. All the elements of vector lmd are equal if modeltype is E** or if $c_{det}=1$ (pa.cdet=1).

Garcia-Escudero, L.A., Mayo-Iscar, A. and Riani M. (2019), Robust parsimonious clustering models. Submitted.