PCA can make VIF worse? Why is it so often sold as a multicollinearity fix? It's the conventional wisdom that a PCA transformation can cure multicollinearity. Putting this into practice on example data, I find myself confused. In the following case, applying PCA seems to have made the multicollinearity (as measured by VIF) much worse!
library(regclass)
library(car)
library(tidymodels)

data("WINE")

##Dropping rating variable

data<-WINE[,-1]

vif(lm(alcohol~.,data=data))

If we are going by the conservative benchmark that VIF of 2 or greater presents multicollinearity that needs to be removed, we need to do something to remove it.

Let's apply PCA.
##3 Varibles with vif over 2, would like to remove that multicollinearity. Let's try pca.

withpca<-recipe(alcohol~.,data=data) %>% step_pca(all_predictors()) %>% prep() %>% juice()



vif(lm(alcohol~.,data=withpca))

#multicollinearity is now much worse!

What has gone wrong? The VIFs for PC1 and PC4 are now astronomical! Can someone explain whether I've misunderstood the conventional wisdom about PCA and multicollinearity or whether that conventional wisdom is just wrong?


It seems that I've made a rookie mistake. It's generally recommended to prep the data before PCA by standardizing it first. Some implementations of PCA automatically do so. This one does not, apparently.
withpca<-recipe(alcohol~.,data=data) %>%step_center(all_predictors())  %>% step_scale(all_predictors()) %>% step_pca(all_predictors()) %>% prep() %>% juice()


vif(lm(alcohol~.,data=withpca))

Now the VIFs look perfect.
