This function rescales a given matrix such that its determinant, trace or the value of the first diagonal element meets a criteria.
Usage
to.shape(M, determ, trace, first)
Arguments
M
a matrix to be scaled
determ
required value for determinant
trace
required value for trace
first
required value of the first diagonal element
Value
The rescaled matrix
Details
If determ, trace or first is given
M is scaled such that its determinant, trace or first diagonal
element, respectively, equals that value. If none of the three is
given M is scaled such that its determinant equals one. If more
than one criteria is given the first of them is used and the others
silently ignored.
References
Paindaveine D. (2008) A Canonical Definition of Shape. Statistics and Probability Letters 78, 2240-2247