From cabacc4b2c47de7f26c0d06bc7afeeb8a9f70f18 Mon Sep 17 00:00:00 2001 From: xuewei cao <36172337+xueweic@users.noreply.github.com> Date: Tue, 15 Apr 2025 21:30:05 -0400 Subject: [PATCH] Update colocboost_inference.R --- R/colocboost_inference.R | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/R/colocboost_inference.R b/R/colocboost_inference.R index eb04444..c3fd9e7 100644 --- a/R/colocboost_inference.R +++ b/R/colocboost_inference.R @@ -25,10 +25,18 @@ colocboost_post_inference <- function() { } -#' Fast calculate correlation matrix +#' @title A fast function to calculate correlation matrix (LD matrix) from individual level data +#' @description +#' This function calculates the correlation matrix (LD matrix) from individual level data. +#' +#' @param X A matrix of individual level data. +#' @param intercepte A logical value indicating whether to include an intercept in the model. Default is FALSE. +#' +#' @return A correlation matrix (LD matrix). +#' #' @rdname colocboost_post_inference #' @keywords cb_post_inference -#' @noRd +#' @export get_cormat <- function(X, intercepte = FALSE){ X = t(X) # Center each variable