rvisualizationpcafactoextrabiplot

R PCA: Why are some points in a biplot larger than others?


Why are some points in a PCA biplot larger than others? Unfortunately, I couldn't find an explanation in the help documentation.

Example:

# Load required library
library(factoextra)

# Perform PCA using prcomp
iris_pca <- prcomp(iris[, 1:4], scale. = TRUE)

# Create a biplot
fviz_pca_biplot(iris_pca, 
                habillage = iris$Species)

enter image description here


Solution

  • What you're seeing is not a size scale, but the mean of each group. This seem to be documented only in factoextra::fviz, not the wrappers. Elsewhere this is passed via ... to ggpubr::ggscatter, which has the following argument that factoextra sets to TRUE by default:

    mean.point logical value. If TRUE, group mean points are added to the plot.

    Can be disabled like so:

    fviz_pca_biplot(iris_pca, 
                    habillage = iris$Species,
                    mean.point = FALSE)
    

    biplot