Closed merliseclyde closed 2 years ago
Describe the bug Test
To Reproduce Steps to reproduce the behavior:
test_that("herdity and BAS", { set.seed(2) data(Pima.tr, package="MASS") pima_BAS <- bas.glm(type ~ (bp + glu + npreg)^2, data = Pima.tr, method = "BAS", betaprior = bic.prior(), family = binomial(), update=NULL, modelprior =uniform(), force.heredity=TRUE) pima_BAS_no <- bas.glm(type ~ (bp + glu + npreg)^2, data = Pima.tr, method = "BAS", betaprior = bic.prior(), family = binomial(), update=NULL, modelprior =uniform(), force.heredity=FALSE) pima_BAS_no <- force.heredity.bas(pima_BAS_no) expect_equal(0L, sum(pima_BAS$probne0 > 1.0)) expect_equal(0L, sum(pima_BAS_no$probne0[-1] > 1.0)) expect_equal(pima_BAS$probne0, pima_BAS_no$probne0) expect_equal(pima_BAS$n.models, pima_BAS_no$n.models) expect_equal(0L, sum(duplicated(pima_BAS$which))) })
Number of models returned by bas.lm with force.heredity = TRUE is greater than the number of models under post processing.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Depends on random seed; also impacts bas.lm
CRAN is no longer checking on Solaris so closing issue
Describe the bug Test
To Reproduce Steps to reproduce the behavior:
test_that("herdity and BAS", { set.seed(2) data(Pima.tr, package="MASS") pima_BAS <- bas.glm(type ~ (bp + glu + npreg)^2, data = Pima.tr, method = "BAS", betaprior = bic.prior(), family = binomial(), update=NULL, modelprior =uniform(), force.heredity=TRUE) pima_BAS_no <- bas.glm(type ~ (bp + glu + npreg)^2, data = Pima.tr, method = "BAS", betaprior = bic.prior(), family = binomial(), update=NULL, modelprior =uniform(), force.heredity=FALSE) pima_BAS_no <- force.heredity.bas(pima_BAS_no) expect_equal(0L, sum(pima_BAS$probne0 > 1.0)) expect_equal(0L, sum(pima_BAS_no$probne0[-1] > 1.0)) expect_equal(pima_BAS$probne0, pima_BAS_no$probne0) expect_equal(pima_BAS$n.models, pima_BAS_no$n.models) expect_equal(0L, sum(duplicated(pima_BAS$which))) })
Number of models returned by bas.lm with force.heredity = TRUE is greater than the number of models under post processing.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Depends on random seed; also impacts bas.lm