<< ols0 Single equation regressions ols2 >>

Grocer >> Single equation regressions > ols1

ols1

ordinary least squares

CALLING SEQUENCE

[rols]=ols1(y,x)

PARAMETERS

Input

* y = dependent variable vector (nobs x 1)

* x = independent variables matrix (nobs x nvar)

 

Output

* rols = a tlist with:

  - rols('meth') = 'ols'

  - rols('y') = y data vector

  - rols('x') = x data matrix

  - rols('nobs') = nobs

  - rols('nvar') = nvars

  - rols('beta') = bhat

  - rols('tstat') = t-stats

  - rols('pvalue') = pvalue of the betas

  - rols('resid') = residuals

  - rols('vcovar') = estimated variance-covariance matrix of beta

  - rols('sige') = estimated variance of the residuals

  - rols('sigu') = sum of squared residuals

  - rols('ser') = standard error of the regression

  - rols('yhat') = yhat

DESCRIPTION

One of the numerous functions performing ordinary least squares: this one assumes that x et y are already a matrix and a vector and does not provide DW, R² statistics. Used in other programs.

EXAMPLE

x=grand(15,3,'nor',0,1)
y=x*ones(3,1)+grand(15,1,'nor',0,1)
r=ols1(y,x)
 
r=ols1(y,ptrend(t,nobs))
//example taken from kpss.

AUTHOR

Eric Dubois 2002

Report an issue
<< ols0 Single equation regressions ols2 >>