hilu: Estimating Linear Models under AR(1) Autocorrelation with...

View source: R/hilu.R

hiluR Documentation

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)



estimated linear model object or formula.


data frame to be specified if mod is a formula.


defines the range and step size of rho values.


logical value, indicating whether details should be printed.


A list object including:

results data frame of basic regression results.
idx.opt index of regression that minimizes SSR.
nregs number of regressions performed.
rho.opt rho-value of regression that minimizes SSR.
y.trans optimal transformed y-values.
X.trans optimal transformed x-values (incl. z).
all.regs data frame of regression results for all considered rho values.
rho.vals vector of used rho values.


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


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

## Direct usage of a model formula
X <- hilu(sick ~ jobless, data = data.sick[1:14,], details = TRUE)

## Print full details

## Suppress details
print(X, details = FALSE)

## Plot SSR over rho-values to see minimum

desk documentation built on May 29, 2024, 6:05 a.m.

Related to hilu in desk...