I currently have a data matrix that has more columns than rows. I am using the principal function in psych
package for my PCAs. I should be able to perform a PCA on this, but cannot seem to get it to work if there are more columns than rows. Error message is about singularity.
With the full matrix, the error message reads
Error in solve.default(r, result$Structure) :
Lapack routine dgesv: system is exactly singular: U[80,80] = 0
If I reduce the # columns, but have it still more than the number of rows, the error message reads:
Error in solve.default(r, result$Structure) :
system is computationally singular: reciprocal condition number =
2.00483e-19
Does anyone know if there are any settings to tweak to get this to work? I only need the first two components. There are no missing values in the matrix.
If I use JMP
, I can get the PCA to work fine.