Learn R Programming

meboot (version 1.0-2)

olsHALL.b: OLS regression model for consumption

Description

Compute OLS coefficients in a regression model for the consumption variable. See details.

Usage

olsHALL.b (y, x)

Arguments

Value

Coeffient estimates by OLS.

Details

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'.

Examples

Run this code
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])

Run the code above in your browser using DataLab