tests/testthat/test-residuals.R

estimate <- EstMGFBetaBin(Chromosome_data$No.of.Asso,Chromosome_data$fre)
fitBB<-fitBetaBin(Chromosome_data$No.of.Asso,Chromosome_data$fre,estimate$a,estimate$b)

context("Checking Outputs")
test_that("checking value 1",{
          expect_identical(round(residuals(fitBB)[1]),
                           -2)
                           })

test_that("checking value 2",{
          expect_identical(round(residuals(fitBB)[2]),
                           6)
                           })

test_that("checking class",{
          expect_that(residuals(fitBB),
          is_a("numeric"))
          })

test_that("checking length of output",{
          expect_equal(length(fitted(fitBB)),4)
          })

Try the fitODBOD package in your browser

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

fitODBOD documentation built on Jan. 15, 2023, 5:11 p.m.