I haven't implemented it, but I guess you can do something like boostrapping in R to do so.
library(boot)
library(data.table) # For its speed
library(magrittr) # For piping
library(fmsb) # For nagelkerkeR2
prs <-
fread("PRSice.best")[In_Regression == "Yes"] # Change it to the best score file, filtering by In_Regression
pheno <- fread("Phenotype") # change this to your phenotype
covariates <- fread("Covariates") # change this to your covariate
data <- merge(pheno, prs, by = c("FID", "IID") %>% # Assume all structures has FID and IID
merge(covariates, by = c, "IID")
result <- boot(
data = data,
statistic = function(data, indices) {
d <-data[indices, ]
full.r2 <- summary(lm(Pheno ~PRS + Covariate, d))$r.squared
null.r2 <- summary(lm(Pheno ~ Covariate, d))$r.squared
return(full.r2 - null.r2)
},
R = 2000
)
boot.ci(result, type = "bca")