R/FPgap.R

Defines functions FPgap

FPgap <-
function(g, rescale, targets, impulses, nstep){
  gap <- 0.0
  a <- matrix(stereo(v=g))
  for(k in 1:nstep){
    scal  <-  matrix(rescale[k,] * (targets[k,] - impulses[k, , ] %*% a))
    scal <- sum(scal^2)
    gap <- gap + scal
  }
  return(gap)
}

Try the VARsignR package in your browser

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

VARsignR documentation built on May 2, 2019, 5:20 a.m.