test_that("MERS runs and returns expected structure", { data("data.sim.mixed") shape <- MERS(y = "ySim", xMain = "hormone", xConf = c("age", "invwt", "race2", "race3", "race4", "race5", "season2", "season3", "season4", "smoking1", "ovum1", "diabetes1"), xRand = "cluster", dataset = data.sim.mixed, nBasis = 5, nIter = 1000) expect_true(!any(is.na(shape$PValueIncr))) expect_true(!any(is.na(shape$PValueDecr))) expect_true(!any(is.na(shape$PValueConv))) expect_true(!any(is.na(shape$PValueConc))) })