Some useful matrix functions for lazy boys and girls


[Up] [Top]

Documentation for package ‘lazy.mat’ version 0.1.4

Help Pages

a2l Convert array to list
a2m Convert array to supermatrix
ABtoAB Linear Constraints Matrices: from (A, d) and (B, c) to (AA,dd,EE,gg) and (BB,cc)
AtoB Linear Constraints Matrices: form A to form B conversion
basis Standard Basis Vector
BtoA Linear Constraints Matrices: form B to form A conversion
b_diag Makes a Block Diagonal Matrix from the Arguments
chkginv Check if the the second matrix is a generalized inverse of the first one, or vice versa.
Diag Diag(x) creats a diagonam matrix from its argument vector or matrix
ExamplesOfGNNR Examples of GN and NR
Geigen Generalized Eigen Problem of the Form ' A P = B P Lambda' where 't(P) B P = I'.
getSM Extract a submatrix from a supermatrix
Ginv Generalized Inverse
GN Gauss-Newton Method for Least Squares Model Fitting
gradQt Maximizing the Trace Quotient of the form ' tr(t(X) A X) / tr( t(X) B X) ' subject to ' t(X) C X = I'.
gradtQ Maximizing the Trace Quotient of the form ' tr(t(X) A X) / tr( t(X) B X) ' subject to ' t(X) C X = I'.
Integrate Integrate a Univariate Function f from lower to Vector-Valued x.
interleave Interleave the columns of Two Matrices
JacobianMat Calculation of Jacobian Matrix
Jennrichnu Maximizing the Trace Quotient of the form ' tr(t(X) A X) / tr( t(X) B X) ' subject to ' t(X) C X = I'.
Kmat Commutation Matrix
l2a Convert list to array
lazy.mat lazy.mat: Some useful matrix tools for lazy boys and girls
LinEq General Solution to a Simultaneous Linear Equations
m2a Convert supermatrix to array
matindex Returns the Index to Convert vec(mat) to vec(t(mat)), etc.
matSwp Matrix Sweep Operator
maxTraceQuotient Maximizing the Trace Quotient of the form ' tr(t(X) A X) / tr( t(X) B X) ' subject to ' t(X) C X = I'.
Mh2Mv Convert a horizontally stacked supermatrix to a vertially stacked one.
modSM<- Assign values to the submatrix of a supermatrix
Mv2Mh Convert a vertically stacked supermatrix to a horizontally stacked one.
NR Newton-Raphson Method for Minimization
P Orthogonal Projection Operators to the Column Space of the Input
pathdist Calculation of Path Distance
pmat Generate a permutation matrix to switch row or column.
Q Projection Operators to the Orthogonal Complement of the Column Space of the Input
QRGS QR decomposition of X matrix by the Gram Schmidt orthogonalization or Finding non redundant columns of X
quotientTrace Maximizing the Trace Quotient of the form ' tr(t(X) A X) / tr( t(X) B X) ' subject to ' t(X) C X = I'.
repmat Stack a matrix n times either horizontally or vertically.
ssq Returns the (doubly weighted) sum of squares of all the elements of A
supermat Declare a supermatrix with SMdim attribute
tr Trace of the input square matrix: Sum of all the diagonal elements of a square matrix.
traceQuotient Maximizing the Trace Quotient of the form ' tr(t(X) A X) / tr( t(X) B X) ' subject to ' t(X) C X = I'.
transp Transpose each matrix contained in a list/array/supermatrix..
vec Vectorization of a matrix
vecdiag Returns diagonal elements of A as a vector
vech Vectorization of the lower-half or upper-half of a square matrix
vechindex Returns the index to convert vech(Mat) to Mat and vice versa.
vechinv Recover the Symmetric Matrix from its lower or upper half elements stored in a vector created by vech function.
vecvecindex Returns the index to convert vec(Mat) to vec(t(Mat)) and vice versa.