check_sparse_pmf_tail: Check that PMF tail is not sparse

View source: R/checks.R

check_sparse_pmf_tailR Documentation

Check that PMF tail is not sparse

Description

Checks if the tail of a PMF vector has more than span consecutive values smaller than tol and throws a warning if so.

Usage

check_sparse_pmf_tail(pmf, span = 5, tol = 1e-06)

Arguments

pmf

A probability mass function vector

span

The number of consecutive indices in the tail to check

tol

The value which to consider the tail as sparse

Value

Called for its side effects.


epiforecasts/EpiNow2 documentation built on Aug. 24, 2024, 5:53 p.m.