R/residual.births_function.R

Defines functions residual.births

Documented in residual.births

#' @title residuals.births
#' @description computes the residuals for when X is the cumulative births. Used internally.
#' @param rho The reporting rate, used to get units correct.
#' @param Yhat The fitted regression line.
#' @param Y The cumulative cases.

residual.births <- function(rho,Yhat,Y){
  ## when X is cumbirths must scale by rho
  Z <- -(Y-Yhat) / rho
  return(Z)
}
adbecker/tsiR documentation built on Oct. 1, 2019, 5:32 p.m.