hilu {desk} | R Documentation |
Estimating Linear Models under AR(1) Autocorrelation with Hildreth and Lu Method
Description
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.
Usage
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 |
range |
defines the range and step size of rho values. |
details |
logical value, indicating whether details should be printed. |
Value
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. |
References
Hildreth, C. & Lu, J.Y. (1960): Demand Relations with Autocorrelated Disturbances. AES Technical Bulletin 276, Michigan State University.
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)
[Package desk version 1.1.1 Index]