factor_analyzer.factor_analyzer_utils.duplication_matrix
factor_analyzer.factor_analyzer_utils.duplication_matrix(n=1)Calculate the duplication matrix.
A function to create the duplication matrix (Dn), which is the unique n2 × n(n+1)/2 matrix which, for any n × n symmetric matrix A, transforms vech(A) into vec(A), as in Dn vech(A) = vec(A).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| n | int | The dimension of the n x n symmetric matrix. Defaults to 1. | 1 |
Returns
| Name | Type | Description |
|---|---|---|
| duplication_matrix | :obj:numpy.ndarray |
The duplication matrix. |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If n is not a positive integer greater than 1. |
References
https://en.wikipedia.org/wiki/Duplication_and_elimination_matrices