R/tsglm.check.R

Defines functions tsglm.check

tsglm.check <- function(fit){
  if(!("tsglm" %in% class(fit))) stop("Object does not have class 'tsglm'")
  listnames <- c("coefficients", "start", "residuals", "fitted.values", "linear.predictors", "response", "logLik", "score", "info.matrix", "info.matrix_corrected", "call", "n_obs", "n_eff", "ts", "model", "xreg", "distr", "distrcoefs", "sigmasq")
  if(!(all(listnames %in% names(fit)))) stop("Object does not have the required named list elements.")
  #include more checks wether it is a proper object of class 'tsglm'
}

Try the tscount package in your browser

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

tscount documentation built on Nov. 25, 2017, 3:01 a.m.