Found this tutorial by Emily Mankin on how to do principal components analysis (PCA) using R. Has a nice example with R code and several good references. The example starts by doing the PCA manually, then uses R's built in prcomp() function to do the same PCA.

Principle Components Analysis: A How-To Manual for R

Hi there,

ReplyDeletegreat posting but unfortunately I'm having some difficulties executing the following code from Box 3:

X=Xoriginal-matrix(rep(rm, dim(X)[2]), nrow=dim(X)[1])

Shouldn't the X on the RHS of the formula be Xoriginal?

Thanks,

Ruben

I've personally had memory allocation issues when doing PCA with genetic data (e.g., implementing my own Eigenstrat-type method). Has anyone tried this version with, say, 100k markers & 1000 samples or something comparable?

ReplyDeleteis the manual shown above available..?I have been trying for a couple of days to d/l it

ReplyDeleteThanks

Sajan

Hmm, I'm having trouble accessing it too. I'll email the folks at Colorado and see if they can get this back online.

ReplyDeleteCan't read the article!

ReplyDeleteYou can find it here: http://www.scribd.com/doc/39718072/PCA-How-To-1

ReplyDeleteI HAD PROBLEMS TO READ THE ARTICLE

ReplyDeleteGreat article ! Thank you

ReplyDeleteVery approximative maths, plenty of typos (e.g., if X is an mxn matrix, XX^t is certainly not a nxn matrix.

ReplyDeleteNOT recommended.

I have problem reading/downloading the article

ReplyDelete