olsHALL.b | R Documentation |
Compute OLS coefficients in a regression model for the consumption variable. See details.
olsHALL.b (y, x)
y |
dependent variable (consumption). |
x |
regressor variable (disposable income). |
The regression model is: c(t) = b1 + b2*c(t) + b3*y(t-1) + u(t), where 'c' is consumption and 'y' is disposable income.
This function is intended to speed up the ME bootstrap procedure
for inference. Instead of using the lm
or dynlm
interfaces the
function calls directly to the Fortran procedure 'dqrls'.
Coeffient estimates by OLS.
data("USconsum")
USconsum <- log(USconsum)
# lm interface
lmcf1 <- lm(USconsum[-1,1] ~ USconsum[-51,1] + USconsum[-51,2])
coefficients(lmcf1)
# dynlm interface
library("dynlm")
lmcf2 <- dynlm(consum ~ L(consum, 1) + L(dispinc, 1), data=USconsum)
coefficients(lmcf2)
# olsHALL.b
olsHALL.b(y=USconsum[,1], x=USconsum[,2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.