R/hildrethlu.R

Defines functions hildreth.lu

Documented in hildreth.lu

hildreth.lu <- function(y, x, rho)
{
  if(abs(rho)>1) stop(paste("rho must be between -1 and 1!", 
                            "\n"))
  t <- 2:length(y)
  y <- y[t] - rho * y[t-1]
  x <- x[t] - rho * x[t-1]
  return(lm(y ~ x))
}

Try the HoRM package in your browser

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

HoRM documentation built on March 11, 2021, 9:07 a.m.