tests/testthat/test-chi_var_ci_no_data.R

test_that("chi_var_ci_no_data works correctly", {
  # Define test values
  s2_given <- 21.5   # Sample variance
  n_given <- 26      # Sample size
  conf_level <- 0.98 # Confidence level

  # Run the function and check results
  result <- chi_var_ci_no_data(s2_given, n_given, conf_level)

  # Expected output should be a numeric vector of length 2
  expect_length(result, 2)

  # Confidence interval bounds should always be positive
  expect_true(all(result > 0))
})

Try the StatTools package in your browser

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

StatTools documentation built on April 12, 2025, 1:17 a.m.