Skip to content

Instantly share code, notes, and snippets.

View BAFurtado's full-sized avatar
🏠
Working from home

B Furtado BAFurtado

🏠
Working from home
View GitHub Profile
library(tidyverse)
library(ggdag)
library(patchwork)
data_confounder <- dagify(
Y ~ Z + X,
X ~ Z,
coords = list(x = c(X = 1, Y = 3, Z = 2),
y = c(X = 1, Y = 1, Z = 2))
) %>%
@vmonaco
vmonaco / runs_test.py
Last active February 1, 2024 04:32
Multivariate Wald-Wolfowitz test to compare the distributions of two samples
"""
Multivariate Wald-Wolfowitz test for two samples in separate CSV files.
See:
Friedman, Jerome H., and Lawrence C. Rafsky.
"Multivariate generalizations of the Wald-Wolfowitz and Smirnov two-sample tests."
The Annals of Statistics (1979): 697-717.
Given multivariate sample X of length m and sample Y of length n, test the null hypothesis: