tests/testthat/test_mse.R

test_that("MSE calculations work", {
  mse <- calculate_all_mse_neutrosophic(
    0.1, 0.2, 10, 20, 5, 15,
    0.3, 0.4, 0.5, 0.6, 0.7, 0.8,
    1.5, 2.5
  )

  expect_equal(length(mse), 6)
  expect_true(all(mse$MSE > 0))
})

test_that("Theta calculation works", {
  theta <- .calculate_theta(1000, 2000, 100, 200)
  expect_equal(theta$theta_L, (1/100)-(1/1000))
})

Try the neutroSurvey package in your browser

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

neutroSurvey documentation built on June 23, 2025, 5:08 p.m.