deconvolution_RL: Richardson-Lucy Deconvolution.

View source: R/deconvolution_RL.R

deconvolution_RLR Documentation

Richardson-Lucy Deconvolution.

Description

Richardson-Lucy Deconvolution.

Usage

deconvolution_RL(
  observed,
  times,
  p_delay,
  max_iter = 50,
  out_col_name = "RL_result",
  right_censor = TRUE,
  verbose = FALSE
)

Arguments

observed

A vector of the number of observed cases, deaths, hospitalizations, etc. per day

times

A numeric vector of times corresponding to the entries in observed. Must be the same length as observed.

p_delay

A numeric vector whose entries give the probability that the delay from infection to observation is exactly 0, 1, ... N days. p_delay must sum to 1 and to facilitate vectorization should be the same length as observed, and times (the last several entries will most likely be 0s).

max_iter

Maximum number of times to iterate. Following Goldstein et al., the algorithm continues to run until the normalized chi2 statistic comparing the observed and expected number of deaths per day falls below 1, or until the maximum number of iterations is reached.

out_col_name

String giving the name of the column in which to output the imputed times of infection

right_censor

If TRUE (default), upscale the observations at the end of the time series based on the cumulative probability that an infection occurring on that date would have been observed.

verbose

Logical. Verbose mode.

Value

A data frame with columns time and out_col_name (which gives the imputed number of infections per timestep)


ern documentation built on April 4, 2025, 2:13 a.m.