R/corTest.R

Defines functions corTest

Documented in corTest

#' Test for vanishing partial correlations
#' 
#' This function simply calls the \code{\link[pcalg]{gaussCItest}}
#' function from the \code{pcalg} package. 
#'
#' @param x Index of x variable
#' @param y Index of y variable
#' @param S Index of S variable(s), possibly NULL
#' @param suffStat Sufficient statistic; list with data,
#' binary variables and order.
#' 
#' @return A numeric, which is the p-value of the test. 
#'
#' @importFrom pcalg gaussCItest
#'
#' @export
corTest <- function(x, y, S, suffStat) {
  gaussCItest(x, y, S, suffStat)
}

Try the causalDisco package in your browser

Any scripts or data that you put into this service are public.

causalDisco documentation built on May 12, 2022, 9:05 a.m.