tests/testthat/test-stationary_distribution.R

test_that("stationary distribution can be computed", {
  tpm <- matrix(0.05, nrow = 3, ncol = 3)
  diag(tpm) <- 0.9
  expect_equal(
    stationary_distribution(tpm),
    c(1, 1, 1) / 3
  )
})

Try the oeli package in your browser

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

oeli documentation built on Oct. 16, 2024, 5:08 p.m.