tests/testthat/test-se_functions.R

test_that("se_meanx works", {
  set.seed(12345)
  x <- rnorm(1000, mean = 1, sd = 2)
  expect_snapshot(se_meanx(x))
})

test_that("se_sx works", {
  set.seed(12345)
  x <- rnorm(1000, mean = 1, sd = 2)
  expect_snapshot(se_sx(x))
})

test_that("se_rxy works", {
  set.seed(12345)
  samples <- setup_joint_normal()$samples
  x <- samples[, 1]
  y <- samples[, 2]
  expect_snapshot(se_rxy(x, y))
})

Try the probstats4econ package in your browser

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

probstats4econ documentation built on Sept. 11, 2024, 8:29 p.m.