How can I control the format of the PCA analysis output in R?

JTim

New Member
#1
I am producing PCA plots in R and every time I get a slightly different format of the plot. Is that possible to standardize the output format (the same position of confidense ellipse, etc.)?
 

Dason

Ambassador to the humans
#2
I don't understand what you're saying. Are the plots changing for the same exact output? Can you provide some example data and code?
 

hlsmith

Not a robit
#3
I haven't worked in PCA, but I support Dason asking if when you execute the exact same line of code the plots are changing, yes/no? Or are you rerunning a section of code?


Do you need to save your output or set a seed somewhere? Code would definitely help.


Thanks.
 

Dason

Ambassador to the humans
#4
Well PCA doesn't have any random components to it. The same input should give the same output so if they're rerunning on the same exact data and getting different output then that would be a concern.
 

JTim

New Member
#5
Thank you for your response. When I am reanalyzing the same data, I do get the same response. So there is no problem there. But if analyze different data, I get a PCA plot of a different format. Please, see the pictures.

What i want is that the ellipse on both plots is located in the center and has as much as possible similar shape for both plots.
 

Attachments

Last edited:

JTim

New Member
#7
Why would it look the same for two different datasets? That doesn't make sense.
Of course, the output is different for two different datasets. But to have some visual consistency, I want that the ellipse takes approximately the same area on the output plot.