tr {JPEN}R Documentation

Trace of matrix

Description

Returns the trace of a matrix

Usage

tr(A)

Arguments

A

A is the input matrix.

Details

Returns the trace (sum of diagonal elements )of input matrix).

Value

Trace of input matrix.

Author(s)

Ashwini Maurya, Email: mauryaas@msu.edu

References

A Well Conditioned and Sparse Estimate of Covariance and Inverse Covariance Matrix Using Joint Penalty. Submitted. http://arxiv.org/pdf/1412.7907v2.pdf

Examples

p=10;n=100;Sig=diag(p);
y=rmvnorm(n,mean=rep(0,p),sigma=Sig);
S=var(y);
tr(S);

[Package JPEN version 1.0 Index]