R/residuals.tsglm.R

Defines functions residuals.tsglm

Documented in residuals.tsglm

residuals.tsglm <- function(object, type=c("response", "pearson", "anscombe"), ...){
  type <- match.arg(type)
  result <- switch(type,
    "response"=object$residuals,  
    "pearson"=object$residuals/sddistr(meanvalue=fitted(object), distr=object$distr, distrcoefs=object$distrcoefs),
    "anscombe"=ardistr(response=object$response, meanvalue=fitted(object), distr=object$distr, distrcoefs=object$distrcoefs)
  )
  return(result)  
}

Try the tscount package in your browser

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

tscount documentation built on May 11, 2023, 3:04 p.m.