Grocer Function
NAME
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
rols=ols2(grocer_y,grocer_x)
This example is taken from ols.
AUTHOR
Eric Dubois 2002