tests/testthat/test_cov_udi.R

context("test_cov_udi.R")
test_that("udi covariance computations look right", {
  set.seed(1)
  Bhat = matrix(rnorm(100),ncol=5)
  L = matrix(rnorm(25),nrow=5,ncol=5)
  V = L %*% t(L)
  data = mash_set_data(Bhat,Shat=1,V=V)
  expect_error(cov_udi(data, c("U","U","D","D","A")))
  expect_error(cov_udi(data, c("U","U","I","I","I")))
  expect_equal(names(cov_udi(data, c("U","U","I","I","D"))), "cov_udi_UUIID")
}
)

Try the mashr package in your browser

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

mashr documentation built on Oct. 18, 2023, 5:08 p.m.