Skip to content

Instantly share code, notes, and snippets.

View bhanlam's full-sized avatar
👋

Lam Bhan bhanlam

👋
View GitHub Profile
@bhanlam
bhanlam / t.test.partial example 1.r
Created July 14, 2022 06:11 — forked from AkselA/t.test.partial example 1.r
T-test for partially paired data
set.seed(1)
n <- 40
p <- 0.3
r <- 0.5
m <- MASS::mvrnorm(n, c(0, 0), matrix(c(1, r, r, 1), 2))
m <- t(t(m) * c(1, 2))
m <- t(t(m) + c(51, 50))
m <- round(m, 1)