That's a good point !
Hi I've done PCA for my gene expression data after DEG analysis, I can see that my case and control samples clustered distinctly but I want to report a p.value for this result, it worth to notice that I have the coordinate csv file that represents coordinates of samples from different phenotypes (case vs control).
Thanks in advance
2 answers
What Nicolas says is true; however, there are indirect ways to derive a P value based on your PCA results.
Buid a regression model
You can indirectly derive P values in your situation by building a binary logistic regression model using the PC1 (or PC2, PC3, ..., PCX) values to predict case/control status. From this, you should see a strong P value based on what you say.
summary(glm(CaseControl ~ PC1))
Correlation
For other type of variables, like continuous variables, you can simply run a correlation test between the continuous variable and the PC1 values, and derive a P value from this too (in R, use cor.test())
PCA is an exploratory data analysis method. It does not test a null hypothesis and generate a p-value.
If you want to compute a p-value maybe you should try pvclust package in R. It didn't use PCA but a hierarchical clustering and report p-values for each sub-tree
PVclust is indeed great, and it bootstraps the clustering.
Actually you can get p-values for the number of principal components. There has been some recent work on this. Unfortunately I have not seen it implemented in any PCA implementations that I use :( https://projecteuclid.org/download/pdfview_1/euclid.aos/1513328584
Log in to answer this question.
PCA is an exploratory data analysis method. It does not test a null hypothesis and generate a p-value.
Perhaps move this to an answer?
ok. I'll try to explain a little bit more then