BookmarkSubscribe
Choose Language Hide Translation Bar
dinosaur4
Occasional Contributor

3D PCA Help

Maybe a dumb PCA question: Just to be safe, I want to compare my PCA graphical outputs between different programs. Previously, I would upload my x,y,z spatial points for each landmark into R, run the PCA, and view the plots, scores, etc. But I started getting some odd results in R when I would re-run the same dataset (hench wanting to compare). When I uploaded my x,y,z values in JMP, and select Analyze > Multivariate Methods > Principal Components, it seems like it’s just treating the points as normal values. These landmarks are from highly 3D objects, yet in the JMP PCA, the 3D graphical output has all of the specimens pretty much on a single plane. (and this looks 100% different from the output done in R) So, could I upload the PC scores into JMP and run the analysis from there? (or would that somehow be generating new scores derived from scores already?) If there’s something I’m missing, or a better alternative, I would greatly appreciate any and all advice/assistance.

0 Kudos
5 REPLIES 5
phil_kay
Staff

Re: 3D PCA Help

Hi,

Can you clarify something - In the 3D plot, are you trying to visualise the x,y,z, coordinates or the principal component scores?

I would expect the principal component scores to sit on a plane. One way of thinking about PCA is that it is a dimension reduction technique. This is what you are seeing in the 3D scores plot in the PCA in JMP. The "highly 3D" variation has been reduced to 2D variation on the first 2 principal components.

Does that make sense?

Happy to look at your data if you are able to share it.

Cheers,
Phil
0 Kudos
dinosaur4
Occasional Contributor

Re: 3D PCA Help

Thanks Phil. For the 3D plots I want to visualize the x,y,z, coordinates from the principal component scores. If it helps to clarify, I've attached an Excel spreadsheet. You'll see one tab which is just the spacial x,y,z coordinates for each landmark from each specimen. The second tab are the PC scores for each landmark. I want the visualize the 3D spacial relationship dervived from the PC scores, but I want to make sure the steps I'm following to create the graph is the proper sequence.

0 Kudos
phil_kay
Staff

Re: 3D PCA Help

Sorry, I don't understand the data. There appear to be 109 variables in this data set (including specimin). Why are there 36 different XYZ values for each specimen and how are you using these variables in PCA to create the 109 variables in your PCA scores tab? In fact, it might be better to go back to basics and ask what the objective of the analysis is and what you are using PCA for.
0 Kudos
dinosaur4
Occasional Contributor

Re: 3D PCA Help

Hopefully I can clarify things. For each of the specimens there are 36 3D landmarks (X1,Y1,Z1,X2,Y2,Z2, etc.). In the program I used to originally get the spatial coordinates (a program called Landmark), the output was to arrange the entire data set with an X, Y, and Z column, with the rows constituting the landmarks. When I originally tried to upload that form of the data set, JMP was reading each row (i.e. each landmark) as a separate specimen. When I sought help in a previous JMP Community post, it was advised to convert each specimen and all of it's X,Y,Z points to a single row (hench the 108 row low entries). Then I found out the output 3D graph was just creating a scatterplot of the spatial points - for example, it was literally plotting a landmark with 3D coordinate 1,2,3 and another with 3,4,5 in those spacial dimensions, not the PC values.

 

So from there I took the PC values from my data set that I got in R and "JMP converted" them (a row constituting a specimens and all of it's PC scores). Even though I have the physical specimens in hand, I want to compare their spatial relationships via a PCA. That's why I thought doing the steps to view the 3D PCA in JMP that I mentioned in the previous comment are okay...but I wanted to double check before preceding too far.

0 Kudos
phil_kay
Staff

Re: 3D PCA Help

Okay but what doesn't make sense in your Excel table is why you apparently have a principal component score for each of the 36 3D landmarks (X1,Y1,Z1,X2,Y2,Z2, etc.) for each specimen. That is not how PCA works.

PCA is mainly used as a variable reduction technique. So you generally reduce a large number of variables down to a small number of PCs. Then you might use the scores for each PC as simpler description of the observations (or specimens).

Or alternatively you use PCA to understand the correlation between variables.

I am not sure what the purpose of using PCA is here.

Sorry!
0 Kudos