Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions R/colocboost_inference.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading