Hi,
I have a prcomp object (generated using the prcomp function) and I am trying to generate a biplot using ggbiplot, however I am confused about the different scaling options and their impact on the meaning of the plot.
ggbiplot(pcobj, choices = 1:2, scale = 1, pc.biplot = TRUE, obs.scale = 1 - scale, var.scale = scale)
scale = covariance biplot (scale = 1), form biplot (scale = 0). When scale = 1, the inner product between the variables approximates the covariance and the distance between the points approximates the Mahalanobis distance.
obs.scale = scale factor to apply to observations
var.scale = scale factor to apply to variables
I am not sure which of these scaling options I should choose for a prcomp object? I have seen lots of people set obs.scale = 1 and var.scale = 1, but I don't understand the reason for this.
What does the line length and angle actually correspond to in a biplot? I get the general idea that a high value on PC1 indicates that the variable has a strong influence on PC1 whilst a small value indicates a small influence. And that if the arrow is pointing to the right, then that variable has a positive impact on the PC.
Thanks for the help!!
Best wishes,
Lucy
Thank you for suggesting PCAtools - I will try this out.
Why do you set obs.scale and var.scale to 1 in the command above? If you change obs.scale, it seems to modify the PC1 axis, while changing var.scale modifies the loading arrows.
If you are unsure what are the roles of these parameters, then I would leave them at the default, or use some other PCA function that has actually passed review by a third party. ggbiplot is on neither CRAN nor BioConductor, the main R package repositories, and is therefore simply some code posted to GitHub. As I mentioned, in addition, the project seems abandoned, with the last commit >4 years ago
The actual lengths of those arrows means nothing, as far as I am aware.