symmetrize {QRMlib} | R Documentation |
ensures a matrix that should be symmetric is really symmetric
symmetrize(matrix)
matrix |
a matrix that should be symmetric |
deals with situations where rounding errors cause symmetric matrices to appear asymmetric
a matrix that is symmetric
## Not run: #lines of code taken from fit.mst() in functionsNormix.R # ... Sigma <- var(data); Sigma <- symmetrize(Sigma); beta <- as.vector(solve(Sigma) mean <- as.numeric(mu+EW*gamma); covariance <- EW*Sigma + varW*outer(gamma,gamma); ## End(Not run)