Skip to content

Commit

Permalink
fix acc
Browse files Browse the repository at this point in the history
  • Loading branch information
buutrg committed Dec 5, 2023
1 parent ca8588b commit a67ecbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/get_PRS_acc.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rr = function(x,digit=10) return(round(x,digit))
#' @export
eval_single_PRS = function(data_df, pheno = "trait", prs_name, covar_list, isbinary=F, liabilityR2=F, alpha=0.05) {

if (var(data_df[prs_name])==0) {
if (var(data_df[,prs_name])==0) {
writeLines(paste0("WARNING: Variance of ", prs_name, "=0. If this is a combined PRS, then covariates already explained the phenotype"))
res = data.frame(pgs=NA, R2=NA, se=NA, lowerCI=NA, upperCI=NA, pval=NA, power=NA)
return(res)
Expand Down

0 comments on commit a67ecbd

Please sign in to comment.