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)
}

Try the tsiR package in your browser

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

tsiR documentation built on Jan. 21, 2021, 1:06 a.m.