tests/testthat/test-MRM.R

context("MRM")

test_that("MRM coefficients match lm", {
          set.seed(888)
          y <- runif(11175)
          x1 <- runif(11175)
          x2 <- runif(11175)
          expect_equal(as.vector(MRM(y ~ x1 + x2, nperm=0)$coef[,1]), as.vector(coefficients(lm(y ~ x1 + x2))))
})

Try the ecodist package in your browser

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

ecodist documentation built on Nov. 2, 2023, 6:01 p.m.