Formatting Data In R To Perform Factor Analysis Using Psych Package
1
0
Entering edit mode
11.3 years ago
soosus ▴ 90

I'm dealing with a .csv full of RPKM values for various genes by genders, brain region, and age formatted thus:

age        1      1      2      2
gender     m      f      m      f 
region     a      b      c      a 
gene1      4.2    2.2    4.1    3.3
gene2      0.4    2.1    3.2    3.3
gene3      0.1    2.2    3.2    7.2

I want to perform a simple factor analysis as demoed here, but am not sure on how my data needs to be formatted in order to do so.

r analysis • 2.3k views
ADD COMMENT
0
Entering edit mode
11.3 years ago

At least with FactoMineR, you need a matrix with genes as columns and samples as rows. I recall the psych package functions being the same.

ADD COMMENT

Login before adding your answer.

Traffic: 1791 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6