Created
October 7, 2019 19:03
-
-
Save monogenea/f3766aa0818a5dad5635edfdd964a1b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Perform SVD | |
mySVD <- svd(mat) | |
mySVD # the diagonal of Sigma mySVD$d is given as a vector | |
sigma <- matrix(0,4,4) # we have 4 PCs, no need for a 5th column | |
diag(sigma) <- mySVD$d # sigma is now our true sigma matrix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment