Name

ols0 — ordinary least squares

CALLING SEQUENCE

[bhat,ixpx]=ols0(y,x)

PARAMETERS

Input

• y = dependent variable vector (nobs x 1)

• x = independent variables matrix (nobs x nvar)

Output

• bhat = estimated beta in y=x*beta+u

• ixpx = inverse of matrix x'*x

DESCRIPTION

The most basic least-squares regression: provides only the estimated beta, bhat, and the inverse of matrix x'*x. Used mainly in other programs.

EXAMPLE

beta=ols0(y,x)
 
This example is taken from hwhite. 

               

AUTHOR

Eric Dubois 2002