powered by
tr(A)
p=10;n=100;Sig=diag(p); y=rmvnorm(n,mean=rep(0,p),sigma=Sig); S=var(y); tr(S);
Run the code above in your browser using DataLab