tr {JPEN} | R Documentation |
Returns the trace of a matrix
tr(A)
A |
A is the input matrix. |
Returns the trace (sum of diagonal elements )of input matrix).
Trace of input matrix.
Ashwini Maurya, Email: mauryaas@msu.edu
A Well Conditioned and Sparse Estimate of Covariance and Inverse Covariance Matrix Using Joint Penalty. Submitted. http://arxiv.org/pdf/1412.7907v2.pdf
p=10;n=100;Sig=diag(p);
y=rmvnorm(n,mean=rep(0,p),sigma=Sig);
S=var(y);
tr(S);