Grocer Function
NAME
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
r=ols1(y,ptrend(t,nobs))
This example is taken from kpss.
AUTHOR
Eric Dubois 2002