<< ols1 Single equation regressions ols2_cons >>

Grocer >> Single equation regressions > ols2

ols2

ordinary least squares

CALLING SEQUENCE

[rols]=ols2(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('yhat') = yhat

  - rols('resid') = residuals

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

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

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

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

  - rols('tstat') = t-stats

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

  - rols('dw') = Durbin-Watson Statistic

  - rols('condindex') = multicolinearity cond index

  - rols('prescte') = boolean indicating the presence or absence of a constant in the regression

  - rols('rsqr') = rsquared

  - rols('rbar') = rbar-squared

  - rols('f') = F-stat for the nullity of coefficients other than the constant

  - rols('pvaluef') = its significance level

DESCRIPTION

Least-squares regression when variables looks like in the textbook. The results tlist contains all the results recorded by ols, except the fields 'namey', 'namex', 'prests', and, naturally, 'bounds'.

EXAMPLE

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

AUTHOR

Eric Dubois 2002

Report an issue
<< ols1 Single equation regressions ols2_cons >>