ols Single equation regressions ols1

Grocer >> Single equation regressions > ols0

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

x=grand(15,3,'nor',0,1)
y=x*ones(3,1)+grand(15,1,'nor',0,1)
b=ols0(y,x)

AUTHOR

Eric Dubois 2002
ols Single equation regressions ols1