hilu function

Estimating Linear Models under AR(1) Autocorrelation with Hildreth and Lu Method

Estimating Linear Models under AR(1) Autocorrelation with Hildreth and Lu Method

If autocorrelated errors can be modeled by an AR(1) process (rho as parameter) then this function finds the rho value that that minimizes SSR in a Prais-Winsten transformed linear model. This is known as Hildreth and Lu estimation. The object returned by this command can be plotted using the plot() function.

hilu(mod, data = list(), range = seq(-1, 1, 0.01), details = FALSE)

Arguments

  • mod: estimated linear model object or formula.
  • data: data frame to be specified if mod is a formula.
  • range: defines the range and step size of rho values.
  • details: logical value, indicating whether details should be printed.

Returns

A list object including:

resultsdata frame of basic regression results.
idx.optindex of regression that minimizes SSR.
nregsnumber of regressions performed.
rho.optrho-value of regression that minimizes SSR.
y.transoptimal transformed y-values.
X.transoptimal transformed x-values (incl. z).
all.regsdata frame of regression results for all considered rho values.
rho.valsvector of used rho values.

Examples

sales.est <- ols(sales ~ price, data = data.filter) ## In this example regressions over 199 rho values between -1 and 1 are carried out ## The one with minimal SSR is printed out hilu(sales.est) ## Direct usage of a model formula X <- hilu(sick ~ jobless, data = data.sick[1:14,], details = TRUE) ## Print full details X ## Suppress details print(X, details = FALSE) ## Plot SSR over rho-values to see minimum plot(X)

References

Hildreth, C. & Lu, J.Y. (1960): Demand Relations with Autocorrelated Disturbances. AES Technical Bulletin 276, Michigan State University.

  • Maintainer: Soenke Hoffmann
  • License: GPL (>= 3)
  • Last published: 2024-12-20