R/fitted.vec2var.R

"fitted.vec2var" <-
function(object, ...){
  if (!is(object, "vec2var")) {
    stop("\nPlease, provide object of class 'vec2var' as 'object'.\n")
  }
  resids <- resid(object)
  fitted <- object$datamat[, colnames(object$y)] - resids
  colnames(fitted) <- paste("fit of", colnames(object$y))
  return(fitted)   
}

Try the vars package in your browser

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

vars documentation built on March 31, 2023, 10:30 p.m.