tests/testthat/test_null_prep.R

context("check null model prep")

test_that("nullModelTestPrep", {
    n <- 100
    dat <- .testNullInputs(n)
    geno <- .testGenoMatrix(n)
    
    # basic
    nullmod <- fitNullMod(dat$y, dat$X, verbose=FALSE)
    Xtilde <- calcXtilde(nullmod, geno)

    expect_equal(dim(Xtilde), c(n, ncol(geno)))
    expect_equal(dim(nullmod$Ytilde), dim(dat$y))

    # with covMatList
    nullmod <- fitNullMod(dat$y, dat$X, dat$cor.mat, verbose=FALSE)
    Xtilde <- calcXtilde(nullmod, geno)

    expect_equal(dim(Xtilde), c(n, ncol(geno)))
    expect_equal(dim(nullmod$Ytilde), dim(dat$y))
})

Try the GENESIS package in your browser

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

GENESIS documentation built on Aug. 3, 2018, 6 p.m.