I was trying to calculate the predicted R square in R programming language for a multiple linear regression model, like one we get in Minitab.
go through this link it gives how it's done in Minitab. But I am not aware how it's done in R
https://statisticsbyjim.com/regression/interpret-adjusted-r-squared-predicted-r-squared-regression/